Simple unofficial request wrapper to integrate with the Ringba Public API.
- GitHub repo: https://github.com/nat5142/ringba-api-client.git
- Documentation: https://ringba-api-client.readthedocs.io
- Free software: MIT
Install:
pip install ringba-api-client
Import:
from ringba_api_client import RingbaApiClient
Initialize:
# provide an API key and account ID
ringba = RingbaApiClient(api_key='XXXXXXXXXXXXXXXX', account_id='XXXXXXXXXXXXXXXX')
# change the account ID
ringba.account_id = 'XXXXXXXXXXXXXXXX'
Use:
target = ringba.get_targets(target_id='abdc12345')
RINGBA_API_TOKEN
RINGBA_ACCOUNT_ID
Both of these are looked up if not provided on object initialization. If API Key is not provided, object initialization fails.
Is the library missing a function that you need and you don't want to update the package? Just extend the class:
# utilities/ringba.py
from ringba_api_client import RingbaApiClient as _RingbaApiClient
class RingbaApiClient(_RingbaApiClient):
def some_new_method(self, *args, **kwargs):
# do stuff
And then import in your project like so:
from utilities.ringba import RingbaApiClient
- Add schema validation for create/update bodies
This package was created with Cookiecutter and the fedejaure/cookiecutter-modern-pypackage project template.