This page explains how to send data from a Python app to Axiom.
To send data from a Python app to Axiom, use the Axiom Python SDK.
The Axiom Python SDK is an open-source project and welcomes your contributions. For more information, see the GitHub repository.
If you use the Axiom CLI, run eval $(axiom config export -f)
to configure your environment variables. Otherwise, create an API token and export it as AXIOM_TOKEN
.
You can also configure the client using options passed to the client constructor:
For more examples, see the examples in GitHub.
AxiomHandler
The example below uses AxiomHandler
to send logs from the logging
module to Axiom:
For a full example, see GitHub.
structlog
The example below uses structlog to send logs to Axiom:
For a full example, see GitHub.
This page explains how to send data from a Python app to Axiom.
To send data from a Python app to Axiom, use the Axiom Python SDK.
The Axiom Python SDK is an open-source project and welcomes your contributions. For more information, see the GitHub repository.
If you use the Axiom CLI, run eval $(axiom config export -f)
to configure your environment variables. Otherwise, create an API token and export it as AXIOM_TOKEN
.
You can also configure the client using options passed to the client constructor:
For more examples, see the examples in GitHub.
AxiomHandler
The example below uses AxiomHandler
to send logs from the logging
module to Axiom:
For a full example, see GitHub.
structlog
The example below uses structlog to send logs to Axiom:
For a full example, see GitHub.