This package simplifies the Opinum API calls.
No magic. You need to follow the Opinum Swagger Documentation for correct formatting of your requests
Be aware that this is a new package, certainly missing a lot of features. Feel free to contribute.
NEW in 1.2.7: added optional operation ID to push_data call
You first need to create an instance of the ApiConnector class with following parameters:
environment
a dictionary of environment variables
if
None, ApiConnector uses your environment variables (os.environ)Mandatory environment variables are:
- OPINUM_USERNAME: the Datahub user.
TAKE CARE: if this user has access to multiple tenants and if you do not specify a tenant id, ApiConnector will use the last tenant used.- OPINUM_PASSWORD: the password for the user
- OPINUM_CLIENT_ID: the client id for accessing the API
- OPINUM_SECRET the corresponding secret
Optional environment variables are:
- OPINUM_API_URL: another API URL than the Europe SaaS one (https://api.opinum.com)
- OPINUM_AUTH_URL: another authentication URL than the Europe SaaS one (https://identity.opinum.com)
- DEFAULT_PUSH_URL: another push URL than the Europe SaaS one (https://push.opinum.com)
- OPINUM_SCOPE: the scope of you session (default: "datahub-api")
if you want to push data, the scope should be "datahub-api push-data"
account_id
one of the tenant ids available for the Datahub user (default:
None)
retries_when_connection_failure
number of extra attempts when no 200 or 204 return code (default: 0, maximum: 5)
Once you have your ApiConnector instance, you may use the class methods
- get
- post
- patch
- put
- delete
- send_file_to_storage
All keyword arguments will be converted to path parameters in the API call with one important exception, the data keyword referring to the body of your call.
There are two other class methods for data pushing because we have another API for this
- push_data
- push_dataframe_data
There is a little bit of magic with the method multi_thread_request_on_path that splits a list of parameters Allowing to make parallel calls.
Metadata
Release files for opinum-api-connector 1.2.7
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 |
|---|---|---|---|---|
| opinum_api_connector-1.2.7.tar.gz | 11.2 kB | Without provenance | Details for opinum_api_connector-1.2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opinum_api_connector-1.2.7-py3-none-any.whl | Python 3 | none | any | Details for opinum_api_connector-1.2.7-py3-none-any.whl |
Total release size: 20.6 kB
Release files / opinum_api_connector-1.2.7.tar.gz
| Download URL | opinum_api_connector-1.2.7.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d985695c6589e403b41f081625f55e93cc3302ee4afaf00e7ed59c3a16ca9d47
|
|
BLAKE2b-256 checksum How to use checksums |
c621b6867ebdd721b35f3f6c54aa984474a1e44bc70d33496a442d5946c20442
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.11
|
Release files / opinum_api_connector-1.2.7-py3-none-any.whl
| Download URL | opinum_api_connector-1.2.7-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
740c98f84b11232cb4e5dac2a0ed7b8c43e7c82abdb647b53e45427ed2b30817
|
|
BLAKE2b-256 checksum How to use checksums |
4540356dc564587155af4062c7d539a24dff009182f164840d3ca987eb6d0ca8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.11
|
Security for opinum-api-connector 1.2.7
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.