Skip to main content

Official Amlexia Python SDK — monitor APIs, AI providers, payments, and infrastructure with traces, latency, and provider intelligence.

Project description

amlexia

Official Python SDK for Amlexia — operational intelligence for APIs, AI providers, payments, and infrastructure.

Send events and traces from Flask, FastAPI, Django, or your own code to https://ingest.amlexia.com.

License: Proprietary — not open source. See LICENSE. Use is subject to the Amlexia Terms of Service.

Requirements

  • Python 3.8+
  • An Amlexia account and project SDK key (am_...) from app.amlexia.com

Install

pip install amlexia

Optional framework extras:

pip install "amlexia[fastapi]"
pip install "amlexia[flask]"

Quick start

import os
from amlexia import AmlexiaClient

client = AmlexiaClient(
    sdk_key=os.environ["AMLEXIA_SDK_KEY"],
    ingest_url=os.environ.get("AMLEXIA_INGEST_URL", "https://ingest.amlexia.com"),
)

client.track(
    endpoint="GET /users/:id",
    method="GET",
    status_code=200,
    latency_ms=95,
    provider="internal",
)

client.shutdown()

Framework integrations

Module Framework
amlexia.fastapi_integration FastAPI / Starlette — AmlexiaMiddleware
amlexia.flask_integration Flask — amlexia_track(client) decorator
amlexia.django_integration Django — add AmlexiaMiddleware to MIDDLEWARE

FastAPI

from fastapi import FastAPI
from amlexia import AmlexiaClient
from amlexia.fastapi_integration import AmlexiaMiddleware

client = AmlexiaClient(sdk_key="am_...", ingest_url="https://ingest.amlexia.com")
app = FastAPI()
app.add_middleware(AmlexiaMiddleware, client=client)

Django

# settings.py
MIDDLEWARE = [
    # ...
    "amlexia.django_integration.AmlexiaMiddleware",
]
# Set AMLEXIA_SDK_KEY in the environment

Environment variables

Variable Description
AMLEXIA_SDK_KEY Project SDK key from the dashboard
AMLEXIA_INGEST_URL Optional; defaults to https://ingest.amlexia.com

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

amlexia-1.0.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file amlexia-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: amlexia-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for amlexia-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ae1209992ddc66c131eae43fa25e183200b6512675c5dd81914eb3bc0a1045a
MD5 8e8f2d4a83d3668f694bfbe1a9e87057
BLAKE2b-256 149463b20a80c4f06dff478b603d2171812eb600366595432943d49835d5232f

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