API for the ekey bionyx system - Python
Overview
The ekey_bionyxpy library can be used to interact with the API of the ekey bionyx biometric systems. All the current functions of the API are mapped. The library is written to completely take advantage of async code in Python.
Features
- Get all systems attached to the user
- Get all webhooks added by the integration
- Add new webhooks
- Update existing webhooks
Enabling the API
The system must be setup in the online mode. In your app please enable the API by following the picture
After the API is enabled you can use the library by first implementing AbstractAuth with your custom token handling.
In the example a token manager is used. You can however use any mechanism you like to retieve an access token.
from ekey_bionyxpy import AbstractAuth
class Auth(AbstractAuth):
def __init__(self, websession: ClientSession, host: str, token_manager):
"""Initialize the auth."""
super().__init__(websession, host)
self.token_manager = token_manager
async def async_get_access_token(self) -> str:
"""Return a valid access token."""
if self.token_manager.is_token_valid():
return self.token_manager.access_token
await self.token_manager.fetch_access_token()
await self.token_manager.save_access_token()
return self.token_manager.access_token
Once the Authentication is dealt with you can use the lib like so:
async def main() -> None:
async with aiohttp.ClientSession() as session:
# Aquire token manager here
auth = Auth(
session,
"https://api.bionyx.io/3rd-party/api",
token_manager,
)
api = BionyxAPI(auth)
systems = await api.get_systems()
webhooks = await systems[0].get_webhooks()
asyncio.run(main())
Metadata
Release files for ekey-bionyxpy 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ekey_bionyxpy-1.0.1.tar.gz | 8.0 kB | Without provenance | Details for ekey_bionyxpy-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ekey_bionyxpy-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for ekey_bionyxpy-1.0.1-py3-none-any.whl |
Total release size: 14.4 kB
Release files / ekey_bionyxpy-1.0.1.tar.gz
| Download URL | ekey_bionyxpy-1.0.1.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5e86e646d7c18403b522ae1edbe2e35377f9d9f4463cd9ed3260949b9148a5e
|
|
BLAKE2b-256 checksum How to use checksums |
1a96bbf3110d00f28e3b9e626069cee5fd05b0cf6694e46a421b1641bcb23b37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / ekey_bionyxpy-1.0.1-py3-none-any.whl
| Download URL | ekey_bionyxpy-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a10fbe1b1d5eb328877e8cb72f2bce5489f4d24e08c5ad619b7169d1bf4332b9
|
|
BLAKE2b-256 checksum How to use checksums |
72e1f577c94e3eb3ca1283ac71a9f1b02f1fcd323f112e5949c11a626ae31688
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for ekey-bionyxpy 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.