Skip to main content

Krontos

High-performance API telemetry and analytics middleware for FastAPI.

Krontos is a lightweight, non-blocking telemetry engine that sits inside your FastAPI application. It automatically intercepts all incoming HTTP requests, calculates exact millisecond latency, captures status codes, and securely fires the logs to your analytics dashboard—without ever slowing down your user's response time.

Features

  • Zero Latency Overhead: Telemetry payloads are compiled and fired using asyncio background tasks. Your users never wait for the analytics engine.
  • Plug & Play: Drop it into any FastAPI app with exactly one line of code.
  • Fail-Safe: Built-in exception handling ensures that if the telemetry server goes offline, your application stays up and running perfectly.
  • Comprehensive Metrics: Tracks route paths, HTTP methods, response times, and error rates automatically.

Installation

Install the package via pip:

pip install krontos

(Requires Python 3.8+ and FastAPI)

Quick Start

To start tracking your API, simply import krontosAPI and add it to your FastAPI app as middleware.

You will need an API Key and a Project Name, which you can generate from your Krontos Dashboard.

from fastapi import FastAPI
from krontos import krontosAPI

app = FastAPI(title="My Awesome API")

# 1. Mount the Krontos Tracking Layer
app.add_middleware(
    krontosAPI,
    api_key="krontosapi_key_YOUR_SECURE_KEY_HERE",
    project="My-Production-App"
)

# 2. Build your app normally!
@app.get("/users")
def get_users():
    return {"message": "This endpoint is now being tracked!"}

@app.get("/checkout")
async def checkout():
    # Krontos will automatically log the exact latency of this route
    return {"status": "success"}

Viewing Your Data

Once your app is live and receiving traffic, log into the Krontos Dashboard to view your real-time time-series charts, pinpoint bottleneck endpoints, and monitor your error rates.

License

This project is licensed under the MIT License.

Metadata

Release files for krontos 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for krontos 0.1.1
File Size Uploaded Provenance Actions
krontos-0.1.1.tar.gz 2.5 kB Without provenance Details for krontos-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for krontos 0.1.1
File Interpreter ABI Platform Actions
krontos-0.1.1-py3-none-any.whl Python 3 none any Details for krontos-0.1.1-py3-none-any.whl

Total release size: 5.6 kB

Release files / krontos-0.1.1.tar.gz

Download URL krontos-0.1.1.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
467a1b6f7685cd9d58a2ec467cce04c45da512816887508aa99d8929fa1a0098
BLAKE2b-256 checksum
How to use checksums
2c72f27c4d921636fbfb868495303626a8889105ebee314a4246d8b3bdbe5690
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / krontos-0.1.1-py3-none-any.whl

Download URL krontos-0.1.1-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ea6d4501041fc18c6943ac76b3b8e07218c0efce95df12c06ef79ae9a446e9f
BLAKE2b-256 checksum
How to use checksums
eb9b22a860a3b5bf552b5154cd35c4d5704eb22ed0407c9a8dc23502208a139f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for krontos 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page