django-llms-manager
Manage llms.txt and llms-full.txt content for AI assistants through the Django
admin. Edit Markdown or import a UTF-8 file, save revisions, review changes, and
publish a selected version at the site root or in a nested directory.
Requires Python 3.10+ and Django 4.2+. Supported Python/Django combinations follow Django's compatibility table.
CI checks the following 22 Python/Django combinations, using the latest available patch release of each Django series:
| Python | Django series |
|---|---|
| 3.10 | 4.2, 5.0, 5.1, 5.2 |
| 3.11 | 4.2, 5.0, 5.1, 5.2 |
| 3.12 | 4.2, 5.0, 5.1, 5.2, 6.0, 6.1 |
| 3.13 | 5.1, 5.2, 6.0, 6.1 |
| 3.14 | 5.2, 6.0, 6.1 |
| 3.15 | 6.1 |
Setup
Install the package with your preferred package manager:
- pip:
python -m pip install django-llms-manager - Poetry:
poetry add django-llms-manager - uv:
uv add django-llms-manager
Add the application to a Django project with the admin enabled:
INSTALLED_APPS = [
...,
"llms_manager",
]
Mount the publication routes at the site root, after specific application routes and before any catch-all route:
from django.urls import include, path
urlpatterns = [
...,
path("", include("llms_manager.urls")),
]
Apply the included migrations using the host project's settings. Run Python in
that project's environment, or use poetry run python / uv run python:
python manage.py migrate
Open Documents in the Django admin to create named documents. Each document has its own editor and revision history. Open Publications to configure their public addresses and select the revisions served there.
Revisions and publishing
- Create a document in Documents, open its Editor, and edit Markdown or import a UTF-8 file. Click Save revision.
- Create or open a publication in Publications and set the directory and
file name (
llms.txtorllms-full.txt). - Select a document, click Show revisions, choose a revision, and click Preview revision.
- Click Save and publish to save the address and selected revision together.
Saving a publication in the admin requires a previewed revision and publishes it.
| Directory | File name | Public address |
|---|---|---|
/ |
llms.txt |
/llms.txt |
/courses/python/ |
llms-full.txt |
/courses/python/llms-full.txt |
Each directory/file-name pair is unique. Changing the address moves the publication.
Both file names are managed independently; llms-full.txt is not assembled
automatically.
Revisions are immutable. To restore earlier content, review and publish an older revision. If the published revision changes, review the updated diff before retrying.
Public files require no login and are served as UTF-8 plain text via GET and
HEAD. Unknown addresses return 404; existing publications without a selected
revision return an empty 200 response.
The admin uses Django's model permissions. Selecting or publishing a revision also
requires view_document or change_document. Documents and revisions cannot be
deleted through the admin.
File storage
Revision files use Django's default storage (STORAGES["default"]). For local files:
MEDIA_ROOT = BASE_DIR / "media"
For S3, configure the django-storages S3 backend in the host project.
The database stores revision metadata and file keys such as
llms_manager/<uuid>.txt. Back up both the database and revision files. When moving
to another storage backend, preserve the stored file keys.
If a revision file is missing or is not valid UTF-8, the admin remains accessible
but cannot publish that revision. Its public URL returns 400 when reading the
file fails.
Caching
Successful public responses cache their text by directory and file name in Django's default cache. Configure the lifetime in seconds (default: 60):
LLMS_MANAGER_CACHE_TIMEOUT = 60
Use a non-negative integer or None. Both 0 and None disable caching.
A cache hit does not query publications or read revision files. Publishing another revision, moving an address, or deleting a publication does not invalidate cached text; the previous response can remain available until its TTL expires. Different addresses have independent cache entries, even when they serve the same revision.
Only 200 responses are cached, including empty publications. Responses with
status 404 or 400 are not cached. Cached text also remains available until
expiry if its storage file is lost or damaged. Admin previews read directly from
storage. This server-side cache does not add HTTP cache headers.
Development
Development uses Python 3.13 and uv. Run these commands from the repository root to prepare the environment:
uv sync
uv run pre-commit install
The .python-version file selects Python 3.13 for development; package support
starts at Python 3.10 as declared in pyproject.toml.
uv sync synchronizes .venv/
with the project dependencies and uv.lock. The dev dependency group includes
the test group with pytest and pytest-django. Pytest uses tests.settings.
tests/ contains a minimal Django project with the admin enabled and a SQLite
database stored in db.sqlite3. It is not part of the distributed package.
To run the project locally:
export DJANGO_SETTINGS_MODULE=tests.settings
uv run python -m django migrate
uv run python -m django createsuperuser
uv run python -m django runserver
Open the admin or
llms.txt. Before a root publication is created,
/llms.txt returns 404. Create a publication through the admin to serve its
selected revision. Local revision files are stored in media/llms_manager/.
The development project defaults to Russian (LANGUAGE_CODE = "ru" in
tests/settings.py); set it to "en" for English.
Run the checks from the repository root:
uv run ruff check .
uv run ruff format --check .
uv run python -m django check --settings=tests.settings
uv run python -m django makemigrations llms_manager --check --dry-run --settings=tests.settings
uv run pytest --migrations
After model changes, generate and review migrations with
uv run python -m django makemigrations llms_manager --settings=tests.settings.
Then apply them with uv run python -m django migrate --settings=tests.settings.
The initial setup uses the included migrations.
Ruff handles linting, import sorting, and formatting through pre-commit and targets Python 3.10 syntax. To run all hooks, including automatic fixes and formatting:
uv run pre-commit run --all-files
Pre-commit checks files tracked by Git. The direct Ruff commands above also cover new Python files before they are tracked.
CI builds the distributions, checks their metadata, installs the wheel with each Python/Django pair in the matrix, checks for missing migrations, and runs the tests from outside the source directory.
Translations
English (en) and Russian (ru) catalogs are in llms_manager/locale/. The
interface uses the active Django language. For Russian by default, set
LANGUAGE_CODE = "ru" and USE_I18N = True in the host project.
With GNU gettext installed, update the catalogs:
cd llms_manager
uv run python -m django makemessages -l en -l ru --no-wrap --no-obsolete
Edit msgstr values in locale/*/LC_MESSAGES/django.po, then compile:
uv run python -m django compilemessages -l en -l ru
Keep both .po and compiled .mo files in version control.
Metadata
Release files for django-llms-manager 0.1.3
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_llms_manager-0.1.3.tar.gz | 24.2 kB | With provenance | Details for django_llms_manager-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_llms_manager-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for django_llms_manager-0.1.3-py3-none-any.whl |
Total release size: 58.9 kB
Release files / django_llms_manager-0.1.3.tar.gz
| Download URL | django_llms_manager-0.1.3.tar.gz |
|---|---|
| Size | 24.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd30d7d348b487cadbb1a8a24a95c71fb6926f04d3affbb8c8d7483a221dec40
|
|
BLAKE2b-256 checksum How to use checksums |
1967af8f4d34ecfe7332c29dd91cdd2f79a2a3975382950ebd642f464ccf86b2
|
| 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 Nov 21, 2026.
Transparency logRelease files / django_llms_manager-0.1.3-py3-none-any.whl
| Download URL | django_llms_manager-0.1.3-py3-none-any.whl |
|---|---|
| Size | 34.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
842723ec1d38dd3f11e1bded5c05fe5ffbe2f3d2c16fc25bc8d0a9932e1a182f
|
|
BLAKE2b-256 checksum How to use checksums |
0cd49f6ac127278ca157b77c9d54b0cb27b81ef0b3ec592f4dce9c331cd0c7c1
|
| 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 Nov 21, 2026.
Transparency logSecurity for django-llms-manager 0.1.3
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 django_llms_manager-0.1.3.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 Nov 21, 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.