AI-Powered Backend Intelligence & Acceleration Platform for Django
Project description
BackendBrain 🧠
BackendBrain is an AI-Powered Backend Intelligence & Acceleration Platform built explicitly for Django.
It is NOT just another monitoring tool. BackendBrain is an intelligent backend engineer that sits inside your application to observe, learn, optimize, and accelerate your database performance.
Core Features
- Zero-Block Telemetry: Event Bus architecture ensures telemetry has <3ms overhead.
- SQL Analyzer: Detects N+1 queries, missing indexes, and slow lookups.
- AI Recommendations: Explains why the DB is slow and exactly how to fix it in Django ORM.
- Accelerator: Smart Response Caching and Request Deduplication to handle traffic spikes.
- Rich HTML Reports: Generates actionable insight reports from the CLI.
Installation
pip install backendbrain
Django Setup
In your settings.py:
# 1. Add to INSTALLED_APPS
INSTALLED_APPS += ['backendbrain.middleware.django']
# 2. Add to MIDDLEWARE (Place high up, after SecurityMiddleware)
MIDDLEWARE.insert(2, 'backendbrain.middleware.django.BackendBrainMiddleware')
# 3. Configure BackendBrain
BACKENDBRAIN = {
"enabled": True,
"cache_learning": True,
"deduplication": True,
"response_cache": True,
}
CLI Usage
Generate an HTML report of your recent telemetry:
backendbrain analyze
backendbrain report --format html
Architecture
BackendBrain operates on a decoupled Event Bus. The Django Middleware emits events asynchronously. A background daemon (Queue) batches and writes these metrics to a local SQLite database (backendbrain.db). The CLI tools then parse this database to generate AI recommendations.
FAQ
Q: Will this slow down my API? A: No. BackendBrain is designed to be invisible. Our benchmark tests prove it adds less than 3ms of overhead to a request.
Q: Does it support PostgreSQL? A: Yes! BackendBrain instruments the generic Django ORM wrapper, so it supports SQLite, PostgreSQL, MySQL, and MariaDB natively without any code changes.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file backendbrain-1.0.0.tar.gz.
File metadata
- Download URL: backendbrain-1.0.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
222485d207da909a4fb2c0490cc653e24f7b475064d9babdf102ee913656ae5a
|
|
| MD5 |
df8ab4e23172a5c9a9d724f90c9bd5eb
|
|
| BLAKE2b-256 |
8990c67d5ea09867839db260e5b2dbf4906acf52ca267595993e80450f4081df
|
Provenance
The following attestation bundles were made for backendbrain-1.0.0.tar.gz:
Publisher:
publish.yml on amanakg/backendbrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
backendbrain-1.0.0.tar.gz -
Subject digest:
222485d207da909a4fb2c0490cc653e24f7b475064d9babdf102ee913656ae5a - Sigstore transparency entry: 2250508360
- Sigstore integration time:
-
Permalink:
amanakg/backendbrain@24b4dea39c5bb7f1bf79fb28d5f3aac9ed10b606 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/amanakg
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@24b4dea39c5bb7f1bf79fb28d5f3aac9ed10b606 -
Trigger Event:
release
-
Statement type:
File details
Details for the file backendbrain-1.0.0-py3-none-any.whl.
File metadata
- Download URL: backendbrain-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c250399b85c1aa348260d8261669227348005243db687634a749b1076b859b4
|
|
| MD5 |
9cd336a6a4bb2be789908af38fa80b6d
|
|
| BLAKE2b-256 |
0033ba259dbafe78c7176258f5bc930b94ee982299c57697b70ba315d1700d6a
|
Provenance
The following attestation bundles were made for backendbrain-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on amanakg/backendbrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
backendbrain-1.0.0-py3-none-any.whl -
Subject digest:
5c250399b85c1aa348260d8261669227348005243db687634a749b1076b859b4 - Sigstore transparency entry: 2250508735
- Sigstore integration time:
-
Permalink:
amanakg/backendbrain@24b4dea39c5bb7f1bf79fb28d5f3aac9ed10b606 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/amanakg
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@24b4dea39c5bb7f1bf79fb28d5f3aac9ed10b606 -
Trigger Event:
release
-
Statement type: