django-ragamuffin
django-ragamuffin adds OpenAI-backed document retrieval and conversational
querying to Django applications. It supports assistant-specific instructions,
uploaded document collections, multimodal query context, reasoning models, and
optional Mathpix PDF extraction.
Requirements
- Python 3.11 or newer
- Django 5.2.17 or newer, below Django 6.1
- OpenAI Python SDK 3.6.0 or newer
- PostgreSQL
Installation
pip install django-ragamuffin
Add grappelli before Django's admin application, then add Ragamuffin and its
database router to your Django settings:
INSTALLED_APPS = [
"grappelli",
"django.contrib.admin",
# The rest of the Django applications...
"django_ragamuffin",
]
DATABASE_ROUTERS = [
"django_ragamuffin.db_routers.RagamuffinRouter",
]
DJANGO_RAGAMUFFIN_DB = "django_ragamuffin"
OPENAI_UPLOAD_STORAGE = "/subdomain-data/query"
USE_CHATGPT = True
AI_MODEL = "gpt-6.1-sol"
AI_MODELS = {
"staff": AI_MODEL,
"default": AI_MODEL,
}
EFFORT = "medium"
Configure the OpenAI API key in the process environment:
export OPENAI_API_KEY="..."
The package includes its Django migrations. Apply them only through the deployment's approved database-migration procedure.
Add the application URLs:
from django.urls import include, path
urlpatterns = [
path("grappelli/", include("grappelli.urls")),
path("django_ragamuffin/", include("django_ragamuffin.urls")),
]
Optional Mathpix extraction
Set USE_MATHPIX=True and provide APP_ID and APP_KEY to enable Mathpix PDF
conversion. Without those credentials, Mathpix integration remains disabled.
License
MIT
Metadata
Release files for django-ragamuffin 3.6.0.10
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 |
|---|---|---|---|---|
| django_ragamuffin-3.6.0.10.tar.gz | 77.5 kB | Without provenance | Details for django_ragamuffin-3.6.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_ragamuffin-3.6.0.10-py3-none-any.whl | Python 3 | none | any | Details for django_ragamuffin-3.6.0.10-py3-none-any.whl |
Total release size: 171.3 kB
Release files / django_ragamuffin-3.6.0.10.tar.gz
| Download URL | django_ragamuffin-3.6.0.10.tar.gz |
|---|---|
| Size | 77.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77c53a86a577c4444d295ad23d215c4080395201a12c3a567bc26013d33819a7
|
|
BLAKE2b-256 checksum How to use checksums |
967f4d2918b97da1730273e020f0482fb196fc6e1442f9fb4517e2335dc641c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / django_ragamuffin-3.6.0.10-py3-none-any.whl
| Download URL | django_ragamuffin-3.6.0.10-py3-none-any.whl |
|---|---|
| Size | 93.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fe9c89081b62fd6ab9a9bde433aff5343e47ef51d348b55edad3770c92cc152
|
|
BLAKE2b-256 checksum How to use checksums |
a18290da4ef19fe261b01c35754ef53918f061233c507751013efbcb092c5072
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for django-ragamuffin 3.6.0.10
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.