Eniris API driver for Python
This repository contains the official Eniris API driver for Python. This driver takes care of authentication as well as request retries and timeouts, in accordance with the authentication API documentation. It offers users an interface which is inspired by the popular requests library.
Installation
To install the latest stable version, use:
pip install eniris
Quick Example
from eniris import ApiDriver
driver = ApiDriver("myUsername", "myPassword")
http_response = driver.get("/v1/device")
response_body = http_response.json()
print(response_body['device'][:10])
driver.close()
Details
The driver constructor accepts the following arguments:
- username (string, required)
- password (string, required)
- authUrl (string, optional, default: 'https://authentication.eniris.be'): URL of authentication endpoint
- apiUrl (string, optional, default: 'https://api.eniris.be'): URL of api endpoint
- timeoutS (int, optional, default: 60): Request timeout in seconds
- maximumRetries (int, optional, default: 5): How many times to try again in case of a failure due to connection or unavailability problems
- initialRetryDelayS (int, optional, default: 1): The initial delay between successive retries in seconds.
- maximumRetryDelayS (int, optional, default: 60): The maximum delay between successive retries in seconds.
- session (requests.Session, optional, default: requests.Session()): A session object to use for all API calls.
Furthermore, the following methods are exposed:
- accesstoken: Get a currently valid accesstoken
- get/delete: Send a HTTP GET/DELETE request. The following parameters are allowed:
- path (string, required): Either a path relative to the apiUrl, or a full URL path
- params (dict, optional, default: None): URL query parameters
- post/put: Send a HTTP POST or PUT request. The following parameters are allowed:
- path (string, required): Either a path relative to the apiUrl, or a full URL path
- json (dict, optional, default: None): JSON body of the request. The json argument and the data argument cannot both be different from None
- params (dict, optional, default: None): URL query parameters
- data (string or dict, optional, default: None): Payload of the request. The json argument and the data argument cannot both be different from None
Metadata
Release files for eniris 0.9.4
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 |
|---|---|---|---|---|
| eniris-0.9.4.tar.gz | 34.1 kB | Without provenance | Details for eniris-0.9.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eniris-0.9.4-py3-none-any.whl | Python 3 | none | any | Details for eniris-0.9.4-py3-none-any.whl |
Total release size: 75.9 kB
Release files / eniris-0.9.4.tar.gz
| Download URL | eniris-0.9.4.tar.gz |
|---|---|
| Size | 34.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d281e3d380ce65308c1f12f87d9548c95917dc8ef01266397dc0381b16104be
|
|
BLAKE2b-256 checksum How to use checksums |
cce3182531dfe46b07f3b804a5c58d09392ca4d5e538484478bc32428e9e9f64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / eniris-0.9.4-py3-none-any.whl
| Download URL | eniris-0.9.4-py3-none-any.whl |
|---|---|
| Size | 41.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e95ad4b286aae020e0b70d32dd68ca024a905839b3ad6e4828685b7c8db6227
|
|
BLAKE2b-256 checksum How to use checksums |
b37ca7e62a20eb66f5e83f0d4d3c7bf27c2a4d86f4a9d01c6c265b08c6cbe964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for eniris 0.9.4
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.