Skip to main content

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

backendbrain-1.0.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

backendbrain-1.0.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

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

Hashes for backendbrain-1.0.0.tar.gz
Algorithm Hash digest
SHA256 222485d207da909a4fb2c0490cc653e24f7b475064d9babdf102ee913656ae5a
MD5 df8ab4e23172a5c9a9d724f90c9bd5eb
BLAKE2b-256 8990c67d5ea09867839db260e5b2dbf4906acf52ca267595993e80450f4081df

See more details on using hashes here.

Provenance

The following attestation bundles were made for backendbrain-1.0.0.tar.gz:

Publisher: publish.yml on amanakg/backendbrain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for backendbrain-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c250399b85c1aa348260d8261669227348005243db687634a749b1076b859b4
MD5 9cd336a6a4bb2be789908af38fa80b6d
BLAKE2b-256 0033ba259dbafe78c7176258f5bc930b94ee982299c57697b70ba315d1700d6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for backendbrain-1.0.0-py3-none-any.whl:

Publisher: publish.yml on amanakg/backendbrain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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