Skip to main content

djrm

CI Python versions Coverage License: BSD-3-Clause

djrm packages Django's ORM, migration framework, and database backends as a standalone library. It keeps the retained Django APIs under the djrm import namespace and omits the web framework.

This is an independent fork. It is not an official Django Software Foundation project.

Installation

The distribution, Python import namespace, and command are all named djrm.

python -m pip install djrm

Release builds are published to PyPI. See Maintenance and releases for the release policy.

Included

  • Models, fields, querysets, managers, expressions, and aggregations
  • Schema migrations and data migrations
  • SQLite, PostgreSQL, MySQL, and Oracle backends
  • djrm.contrib.contenttypes and djrm.contrib.postgres
  • Database-focused commands including makemigrations, migrate, showmigrations, dumpdata, and loaddata

HTTP handling, URL routing, views, middleware, templates, forms, auth, admin, sessions, static files, and other web-facing components are not included. The package does not provide a compatibility django namespace.

Minimal setup

import djrm
from djrm.conf import settings

settings.configure(
    DATABASES={
        "default": {
            "ENGINE": "djrm.db.backends.sqlite3",
            "NAME": ":memory:",
        }
    },
    DEFAULT_AUTO_FIELD="djrm.db.models.BigAutoField",
    INSTALLED_APPS=[],
)
djrm.setup()

Commands use the same settings conventions as Django:

export DJANGO_SETTINGS_MODULE=myproject.settings
djrm migrate
python -m djrm showmigrations

DJANGO_SETTINGS_MODULE keeps its upstream name. Only Python import paths move from django.* to djrm.*.

Development

Install uv, then run:

make install
make check
make test
make build
make check-dist

make test runs the package smoke tests and the retained SQLite ORM suite.

Maintenance and releases

main carries the currently supported Django LTS line. Production builds start from an exact official Django release tag and use SemVer:

Django 5.2.17 -> djrm 0.1.0
Django 6.2    -> djrm 1.0.0

djrm 0.x corresponds to Django 5.2 LTS, 1.x corresponds to Django 6.2 LTS, and each later LTS gets the next major. Within an LTS line, a newer Django patch tag increments the djrm minor; a djrm-only fix from the same tag increments the patch. The exact Django tag is recorded as release provenance. The update tool creates a separate worktree, performs the namespace conversion, applies the reviewed fork tree delta with a three-way merge, and stops for human review when upstream changed retained code incompatibly.

uv run python scripts/apply_django_lts.py \
  --django-ref 5.2.17 \
  --output ../djrm-5.2.17

See MAINTENANCE.md for the branch model, release gate, conflict workflow, and PyPI setup. SPEC.md defines the retained API.

License and attribution

The retained Django code remains under Django's BSD 3-Clause license. See LICENSE, LICENSE.python, and AUTHORS. Django is a registered trademark of the Django Software Foundation.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djrm-0.1.0.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

djrm-0.1.0-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file djrm-0.1.0.tar.gz.

File metadata

  • Download URL: djrm-0.1.0.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for djrm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 48062c95bd65360906c98b09f71e7965589d569fb6d70bd35df90ca9fbf3f9e6
MD5 5aa1e877aef11f36233bc36fdcdad1fc
BLAKE2b-256 522e9700b9082adcab1845b08b4a9ecad467b60b6f9c749201ea08546bfa5e74

See more details on using hashes here.

File details

Details for the file djrm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: djrm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for djrm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 466a953c0e5e6549d776edbf1c73599e73c61e7e361df6691cfbd6911a1c7e72
MD5 e07d76d82fdb45e26ca0138f121ebd81
BLAKE2b-256 ae1b295b6748d224b3180e112f4252031423dbadb0fa0cfd14e8a18a2e407ba6

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page