Authentication library and wrapper for NPAW Youbora API.
This module contains:
YouboraAuth
- custom authorisation provider for Python Requests, checkexample_auth.py
YouboraClient
- Wrapper which utilises Swagger definition to validate requests against NPAW Youbora before executing Request, checkexample_client.py
- install latest package with
pip install PyYoubora
- check out included
example_auth.py
andexample_client.py
to get understanding how to use - but, basically this gives you:
import requests
from youbora import YouboraAuth
query = {}
response = requests.get('https://api.youbora.com/:system_code:/data',
params=query,
auth=YouboraAuth("secret", "system_code")
- to extend library with helpers such as:
- More Swagger API validations;
- Youbora Query Builder, interactive perhaps ?
- Youbora Filter Builder, interactive perhaps ?
- Response formatter for quick report/graph generations in various formats
- This code base (examples and config-sample.py) assumes that swagger is available within base directory as swagger.json
- both example_x.py assumes that you have copied config-sample.py to config.py and have provided details there.
- you can very easy use any other config approach - sysarg, env, AWS KMS, etc.
- This has been created to ease my daily interaction with Youbora API as customer, I am not anyhow related to NPAW;
- Publishing this repository has been agreed with NPAW;