Skip to main content

Library to interact with AllOnIA's API

Project description

Public Project AllOnIARest

Implements several client objects to access easily AllOnIA's public APIs (provided you have a valid token of course).

from alloniarest import Client

url = ...
token_id = ...
token_secret = ...

client = Client(
    url,
    user_token={
        "id": token_id, "token": token_secret
    },
    trace=False
)
response = client.request(
    "GET",
    "/some/route?var=value"
)

Available APIs

You can manualy connect to any AllOnIA API using the example above, but some functions are readily available through extra requirements, that you can install like this:

pip install alloniarest[extra]

Here is the list of available extras:

  • external_api_keys: provides the method get_external_api_key_value that returns an external API key's secret based on its name:
from alloniarest.external_api_keys import get_external_api_key_value

secret = get_external_api_key_value("key_name")

That will suppose you have set the USER_TOKEN_ID, USER_TOKEN_SECRET, PROJECTS_API_INTERNAL_URL and TRACK_ID environment variables.

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

alloniarest-1.2.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

alloniarest-1.2.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file alloniarest-1.2.2.tar.gz.

File metadata

  • Download URL: alloniarest-1.2.2.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/5.4.0-148-generic

File hashes

Hashes for alloniarest-1.2.2.tar.gz
Algorithm Hash digest
SHA256 800e6bd859c11c20e713d27af807e0eb0802699fa09fbdffa2ae95390be62257
MD5 a9fdae3dd2a9d7c970d25fbe32e06fc2
BLAKE2b-256 c06c26687149b06993b162a69c99463f3e93cddfd5a0611d21e471da4cba3492

See more details on using hashes here.

File details

Details for the file alloniarest-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: alloniarest-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/5.4.0-148-generic

File hashes

Hashes for alloniarest-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7c6554aadfd4209e1a2eb95784b64e1f185ca0eaca1b689bc91888c2d292c58
MD5 2b451bb0c5a608938efae6ba03cec3ee
BLAKE2b-256 b6cd0c5a3efca795b3ea955af2cb6aa6c88532a1dcc5ecd7b6bd24dcc898e38f

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