Axiom API Python bindings.
Axiom Py is a Python client library for accessing the Axiom API.
Currently, Axiom Py requires Python3 or greater.
git clone `https://github.com/axiomhq/axiom-py`
cd axiom-py
The Client is initialized with the url of the deployment and an access token. The access token can be a personal token retreived from the users profile page or an ingest token retrieved from the settings of the Axiom deployment.
The personal access token grants access to all resources available to the user on his behalf.
The ingest token just allows ingestion into the datasets the token is configured for.
import os
import axiom
deployment_url = os.getenv("AXIOM_URL")
access_token = os.getenv("AXIOM_TOKEN")
# needed only when using Axiom cloud, otherwise set to None
org_id = os.getenv("AXIOM_ORG_ID")
client = axiom.Client(deployment_url, access_token, org_id)
# Ingest into a dataset
print(client.datasets.ingest("foobar", [{"foo": "bar"}]))
You can find the Axiom and Axiom Py documentation on the docs website.
This project uses Poetry for dependecy management and packaging, so make sure that this is installed (see Poetry Installation).
Run poetry install
to install dependencies and poetry shell
to activate a
virtual environment.
© Axiom, Inc., 2021
Distributed under MIT License (The MIT License
).
See LICENSE for more information.