Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Redline

redline-core

The framework-agnostic engine behind Redline, a self-hosted request profiler and backend analyzer and load tester for Django, FastAPI, Flask and Litestar.

redline-core holds everything that does not depend on a web framework:

  • the trace/span data model and a contextvars recorder that is correct across threads and asyncio tasks and costs next to nothing when no request is being recorded;
  • SQL fingerprinting, project-only callsite capture and secret redaction;
  • detectors for N+1 queries, duplicate queries, slow queries and query budgets, plus event-loop blocking, long transactions, huge and unbounded results, len(qs) vs .exists(), slow serializers and slow, duplicated or retried external calls;
  • an on-demand EXPLAIN runner with plan analysis for PostgreSQL, MySQL and SQLite;
  • an optional pyinstrument flamegraph profiler (redline-core[profile]);
  • a separate SQLite store with a background writer, retention, hourly rollups and release history;
  • a load tester (redline load, extra load) with an open-model scheduler, knee detection and per-step bottlenecks;
  • optional integrations in redline_core.contrib (SQLAlchemy, httpx, requests, redis, asyncpg, psycopg, Marshmallow, Strawberry, Graphene);
  • the access policy and layered configuration shared by every adapter;
  • the framework-neutral JSON API and the prebuilt web UI.

It has no runtime dependencies.

You probably want an adapter

Install the package for your framework; it pulls in redline-core for you:

Redline is not on PyPI yet: install from GitHub, naming the adapter and redline-core in one command (the adapter pins the core exactly). Adapters: django-redline, fastapi-redline, flask-redline, litestar-redline.

pip install \
  "django-redline @ git+https://github.com/Pythondeveloper6/redline#subdirectory=packages/django-redline" \
  "redline-core @ git+https://github.com/Pythondeveloper6/redline#subdirectory=packages/redline-core"

Extras on the core requirement: profile (flamegraphs), load (the load tester), and httpx, requests, redis, asyncpg, psycopg, strawberry, graphene. Documentation: https://pythondeveloper6.github.io/redline/.

Timing your own code

import redline_core

@redline_core.span("pricing.compute")
def compute_price(order): ...

async def handler():
    async with redline_core.span("fetch-rates", kind="custom", provider="ecb"):
        ...

span() does nothing (and costs almost nothing) outside a recorded request.

License

MIT

Metadata

Release files for redline-core 0.2.0a1

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

Source distribution (sdist)

Source distribution for redline-core 0.2.0a1
File Size Uploaded Provenance Actions
redline_core-0.2.0a1.tar.gz 466.1 kB With provenance Details for redline_core-0.2.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for redline-core 0.2.0a1
File Interpreter ABI Platform Actions
redline_core-0.2.0a1-py3-none-any.whl Python 3 none any Details for redline_core-0.2.0a1-py3-none-any.whl

Total release size: 862.5 kB

Release files / redline_core-0.2.0a1.tar.gz

Download URL redline_core-0.2.0a1.tar.gz
Size 466.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e28b16284d2640cd65f7ae58c62bba6053547bfcaf00f47f977f6a8097f26f3c
BLAKE2b-256 checksum
How to use checksums
67dc32ca4e3a707455c81a85bf33e939114ca2a0e71da740708fbb3dba83673a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / redline_core-0.2.0a1-py3-none-any.whl

Download URL redline_core-0.2.0a1-py3-none-any.whl
Size 396.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84583ae58edc54bc3e5713a27d3186875e09b60f574e62fee5283f2d790f360c
BLAKE2b-256 checksum
How to use checksums
c83b8f05ee2266ae8dd1a0b5ba1277f1eaa404ddccd039a510e28b680c8cb489
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for redline-core 0.2.0a1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for redline_core-0.2.0a1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

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.

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