semvec/pypi-packages huggingface dataset:
chimoney-py 0.0.2
A Python package for Chimoney
License: MIT
Requires Python: >=3.6
Keywords: Chimoney,Python,Chimoney-Python,Chimoney Python,Chimoney Python Wrapper

# PyChimoney

pychimoney is a python wrapper for <a href="https://chimoney.io"> Chimoney </a>

    - Account
    - Info
    - Payout
    - Mobile Money 
    - Wallet
    - Sub-Account
    - Redeem

## Getting Started
- Register with <a href="https://chimoney.io"> Chimoney </a>
- Request for API KEY from support
- set Your "CHIMONEY_AUTH_KEY" environment variable

## Installing 
    - pip install chimoney-py
### OR
    - git clone "the repo"
    - cd pychimoney
    - python setup.py install or
    - pip3 install .

## Usage
#### Importing the package
```python
from chimoney import Chimoney
```
#### Creating an instance of the Chimoney class
```python
chimoney = Chimoney.set_api_key("API-KEY")
```

#### Full Example
```python
    from pychimoney import Chimoney
    import os

    # Initialize Chimoney
    chimoney = Chimoney.set_api_key("CHIMONEY_AUTH_KEY")
```
 #### Using the Account API
 ```python

    chimoney.account.required_function(params)
```

## TODO

- [x] Add all Endpoints
- [ ] Write Unit Tests
- [x] Package the Library
- [x] Add to Pip
- [ ] Add Pytest and Covrage for Test
- [ ] Documentation
trier 1.0.6
Utility wrapper to handle exceptions.
License: MIT
Requires Python: >=3.8,<4.0
Keywords: error-handling,python3,async-await,try-except,try-catch

# trier

> Utility wrapper class to handle exceptions.

[![PyPI version](https://badge.fury.io/py/trier.svg)](https://badge.fury.io/py/trier)
[![trier CI](https://github.com/omegatrix/trier/actions/workflows/build.yaml/badge.svg)](https://github.com/omegatrix/trier/actions/workflows/build.yaml)
[![codecov](https://codecov.io/gh/omegatrix/trier/branch/main/graph/badge.svg?token=2M0QOSUPM0)](https://codecov.io/gh/omegatrix/trier)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/trier)

## Supported Python versions
`Python >= 3.8`


## Installation
You can [install `trier` from PyPI](https://pypi.org/project/trier), with `pip`:

```bash
python -m pip install trier
```

## Example usage
Instead of using `try except` block you could replace it with `trier`.

```py
from trier import Try

err, val = Try(lambda: 10 / 0).catch(ZeroDivisionError)

if err:
    # handle error

# do stuff with `val`

# Another way to handle could be
if not err:
  # do stuff with `val`
```

Supports multiple exceptions.
```py
from trier import Try

err, file = Try(open, file="doenot_exist.txt").catch(FileNotFoundError, OSError)

if err:
    # handle error

# do stuff with `file`
```

Supports async error handling as well.
```py
import asyncio
from httpx import AsyncClient, HTTPStatusError, Response
from trier import Try

def raise_on_4xx_5xx(response):
    response.raise_for_status()

async def main():
    client = AsyncClient(event_hooks={"response": [raise_on_4xx_5xx]})

    # The endpoint responds with a 404 error
    err, response = await Try(client.get, "https://run.mocky.io/v3/201f1fe6-5a3b-49c1-9df7-312951618405").async_catch(HTTPStatusError)

    if err:
        # Handle error

    # do stuff with `response`

asyncio.run(main())
```

## Changelog

Refer to the [CHANGELOG](https://github.com/omegatrix/trier/blob/main/CHANGELOG.md).

## License

MIT - See the [LICENSE](https://github.com/omegatrix/trier/blob/main/LICENSE) for more information.