Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Axiom unlocks observability at any scale.
For more information check out the official documentation and our community Discord.
Install using pip
:
# Linux / MacOS
python3 -m pip install axiom-py
# Windows
py -m pip install axiom-py
Alternatively, if you have the pip
package installed, you can install axiom-py
with the following command:
pip3 install axiom-py
If you use the Axiom CLI, run eval $(axiom config export -f)
to configure your environment variables.
Otherwise create a personal token in the Axiom settings and export it as AXIOM_TOKEN
. Set AXIOM_ORG_ID
to the organization ID from the settings page of the organization you want to access.
You can also configure the client using options passed to the client constructor:
import axiom_py
client = axiom_py.Client("<api token>", "<org id>")
Create and use a client like this:
import axiom_py
import rfc3339
from datetime import datetime,timedelta
client = axiom_py.Client()
client.ingest_events(
dataset="my-dataset",
events=[
{"foo": "bar"},
{"bar": "baz"},
])
client.query(r"['my-dataset'] | where foo == 'bar' | limit 100")
For more examples, see examples/client.py
.
You can use the AxiomHandler
to send logs from the logging
module to Axiom
like this:
import axiom_py
from axiom_py.logging import AxiomHandler
import logging
def setup_logger():
client = axiom_py.Client()
handler = AxiomHandler(client, "my-dataset")
logging.getLogger().addHandler(handler)
For a full example, see examples/logger.py
.
If you use structlog, you can set up the
AxiomProcessor
like this:
from axiom_py import Client
from axiom_py.structlog import AxiomProcessor
def setup_logger():
client = Client()
structlog.configure(
processors=[
# ...
structlog.processors.add_log_level,
structlog.processors.TimeStamper(fmt="iso", key="_time"),
AxiomProcessor(client, "my-dataset"),
# ...
]
)
For a full example, see examples/structlog.py
.
This project uses uv for dependency management and packaging, so make sure that this is installed.
To lint and format files before commit, run uvx pre-commit install
.
Distributed under MIT License (The MIT License
).
FAQs
Official bindings for the Axiom API
We found that axiom-py demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.