Absolidix infra API client in Python
Project description
Absolidix API client
This library allows for programmatic interactions with the Absolidix infrastructure.
Installation
pip install absolidix_client
Usage
There are two client flavors: asyncronous asyncio client
and simplified synchronous client.
Asynchronous client
An asynchronous client is AbsolidixAPIAsync. Example of usage:
from absolidix_client import AbsolidixAPIAsync, AbsolidixTokenAuth
async def main():
async with AbsolidixAPIAsync(API_URL, auth=AbsolidixTokenAuth("VERY_SECRET_TOKEN")) as client:
print(await client.v0.auth.whoami())
data = await client.v0.datasources.create(content, name)
results = await client.v0.calculations.create_get_results(data["id"])
print(resuls)
See examples directory for more examples.
Synchronous client
A synchronous client is AbsolidixAPI. Example of usage:
from absolidix_client import AbsolidixAPI, AbsolidixTokenAuth
client = AbsolidixAPI(API_URL, auth=AbsolidixTokenAuth("VERY_SECRET_TOKEN"), timeout=5)
data = client.v0.datasources.create(content, name)
results = client.v0.calculations.create_get_results(data["id"], timeout=False)
print(results)
NB in development one can replace a VERY_SECRET_TOKEN string with the development user email, e.g.
admin@test.com (refer to users_emails BFF table).
Contributing
Please give a minute to the contribution guide.
License
Author Sergey Korolev, Tilde Materials Informatics
Copyright 2023-2024 BASF SE Copyright 2024-2025 Tilde Materials Informatics
BSD 3-Clause
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file absolidix_client-0.8.2.tar.gz.
File metadata
- Download URL: absolidix_client-0.8.2.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6125fa63768136681c5399878b45963c0286322454cd7337ed5249f190076bb7
|
|
| MD5 |
cfeda06bb96a2cfbc08914715d389959
|
|
| BLAKE2b-256 |
85fa1557e11af8e6b620cdebf4d6708ee7f98731dbfd4ce1ef9acdb130bac16c
|
File details
Details for the file absolidix_client-0.8.2-py3-none-any.whl.
File metadata
- Download URL: absolidix_client-0.8.2-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a170c7e84d243b2f4801c71d392a584d3c04cdffd660a5b423cdc40f86ad2d8f
|
|
| MD5 |
fe4d4a201765ab6fb79e54f5ea7f74a9
|
|
| BLAKE2b-256 |
1db1064c2d557cf641b57504d4b084bd6c322121367868fda719aa63811fec09
|