Skip to main content

Absolidix infra API client in Python

Project description

Absolidix API client

DOI PyPI

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

absolidix_client-0.8.2.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

absolidix_client-0.8.2-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

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

Hashes for absolidix_client-0.8.2.tar.gz
Algorithm Hash digest
SHA256 6125fa63768136681c5399878b45963c0286322454cd7337ed5249f190076bb7
MD5 cfeda06bb96a2cfbc08914715d389959
BLAKE2b-256 85fa1557e11af8e6b620cdebf4d6708ee7f98731dbfd4ce1ef9acdb130bac16c

See more details on using hashes here.

File details

Details for the file absolidix_client-0.8.2-py3-none-any.whl.

File metadata

File hashes

Hashes for absolidix_client-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a170c7e84d243b2f4801c71d392a584d3c04cdffd660a5b423cdc40f86ad2d8f
MD5 fe4d4a201765ab6fb79e54f5ea7f74a9
BLAKE2b-256 1db1064c2d557cf641b57504d4b084bd6c322121367868fda719aa63811fec09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page