This release is a pre-release and may not be stable for production use.
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
contextvarsrecorder that is correct across threads andasynciotasks 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
EXPLAINrunner with plan analysis for PostgreSQL, MySQL and SQLite; - an optional
pyinstrumentflamegraph profiler (redline-core[profile]); - a separate SQLite store with a background writer, retention, hourly rollups and release history;
- a load tester (
redline load, extraload) with an open-model scheduler, knee detection and per-step bottlenecks; - a refactor check (
redline check, extraload): record a baseline of read-only requests, compare a new version, per-endpoint verdicts on responses and speed, JUnit and Markdown output; - 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.3.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| redline_core-0.3.0a1.tar.gz | 616.7 kB | With provenance | Details for redline_core-0.3.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| redline_core-0.3.0a1-py3-none-any.whl | Python 3 | none | any | Details for redline_core-0.3.0a1-py3-none-any.whl |
Total release size: 1.1 MB
Release files / redline_core-0.3.0a1.tar.gz
| Download URL | redline_core-0.3.0a1.tar.gz |
|---|---|
| Size | 616.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cff8ed579c6dac362d5babfd0c88d80c8791165dc29c12b05319ef4b06b928af
|
|
BLAKE2b-256 checksum How to use checksums |
66a59dd537b84e4a1044cfa108ad4194d8c90087de67dbfff1a7e17fdd713b9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / redline_core-0.3.0a1-py3-none-any.whl
| Download URL | redline_core-0.3.0a1-py3-none-any.whl |
|---|---|
| Size | 523.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cb33d3f7170a2dd28a2599ca62a6631dafcd36bec261473f599788711dec5998
|
|
BLAKE2b-256 checksum How to use checksums |
deb937f5c3c70a2bf4b28c845e753115105b02eddc54c7e7bb03195626439fae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logSecurity for redline-core 0.3.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.
Attestation for redline_core-0.3.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 28, 2026.
Transparency logA 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.