Skip to main content

django-llms-manager

Tests PyPI Downloads Python Django License Ruff pre-commit

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

  1. Create a document in Documents, open its Editor, and edit Markdown or import a UTF-8 file. Click Save revision.
  2. Create or open a publication in Publications and set the directory and file name (llms.txt or llms-full.txt).
  3. Select a document, click Show revisions, choose a revision, and click Preview revision.
  4. 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 immediately.

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

Revision text uses 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.

Each request resolves the current publication, so a newly published revision is served on the next request. Admin previews read directly from storage. Cached text remains available until its TTL expires if the storage file is lost or damaged.

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. Creating a publication through the admin immediately serves 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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-llms-manager 0.1.2
File Size Uploaded Provenance Actions
django_llms_manager-0.1.2.tar.gz 24.1 kB With provenance Details for django_llms_manager-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-llms-manager 0.1.2
File Interpreter ABI Platform Actions
django_llms_manager-0.1.2-py3-none-any.whl Python 3 none any Details for django_llms_manager-0.1.2-py3-none-any.whl

Total release size: 58.5 kB

Release files / django_llms_manager-0.1.2.tar.gz

Download URL django_llms_manager-0.1.2.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
30aac7d3d59c73a52805951183d686824b88fa8bc2481d0b0b3bf66e3b51196c
BLAKE2b-256 checksum
How to use checksums
c9a152c046b2a79cb24dc7eff7de2cafb34cc03c922e50cf1a31b7e690476f58
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 19, 2026.

Transparency log

Release files / django_llms_manager-0.1.2-py3-none-any.whl

Download URL django_llms_manager-0.1.2-py3-none-any.whl
Size 34.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbb72f849059afa0c898ecb2964c3c021110708c28d6757fd1e24a1c8a96c930
BLAKE2b-256 checksum
How to use checksums
c4e21a6af5e4362ab43ae7adf948fe5c3549d10a203d98a5843db7423e25f539
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 19, 2026.

Transparency log

Security for django-llms-manager 0.1.2

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.

Select from 2 files

Attestation for django_llms_manager-0.1.2.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 19, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page