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 2024-2025 Tilde Materials Informatics

Copyright 2023-2024 BASF SE

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.4.tar.gz (28.3 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.4-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file absolidix_client-0.8.4.tar.gz.

File metadata

  • Download URL: absolidix_client-0.8.4.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for absolidix_client-0.8.4.tar.gz
Algorithm Hash digest
SHA256 d9ac0b4a15e2f380ebeee6ca436c5e0c5b4c6a10a112435b9068e26df7d5f679
MD5 0f344e4f940a67beb6e9af6fff450227
BLAKE2b-256 297080a24dac9c135f11e7040f08f0f34ef3f2ce262e7d663f83f0070a01d159

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for absolidix_client-0.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fb0077e30710e94ccd40b15c33c7bd551f166ebb7810c39d66bed891967bac1f
MD5 a97d6c7a9a2fce8830d9f6509173db99
BLAKE2b-256 f559c51950d01b62bfd5ebe28f41e0f31834f8342077b0b0b940139547816b0e

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