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.1.tar.gz (19.7 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.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for absolidix_client-0.8.1.tar.gz
Algorithm Hash digest
SHA256 4b5c3ad7b913c7bc9f3e37ca96522f323156802240ff9b6ae7fd50f3dc002324
MD5 4579dde9d630c24f3ba63336e216fc5a
BLAKE2b-256 82c991c01571508085aa4d046ba37709f2c85693935c79a3e52119ffe104818f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for absolidix_client-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e68bc847aa3cbc4c03f8ab9487b7a52736ff717a23bf94444e60185dd70f0430
MD5 609d4c3e4a949e49231830ace7b0af2b
BLAKE2b-256 b6a7773cec6cdafcca1b240fa4e09294ed284d1b66c6c88dadd3551650b37515

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