Skip to main content

django-litestream

PyPI - Version PyPI - Python Version PyPI - Versions from Framework Classifiers MIT License

Django integration for Litestream, the SQLite replication tool. The Litestream binary is bundled in platform-specific wheels — no manual download needed. All upstream commands are available as python manage.py litestream <command>.

Note: This package tracks Litestream's upstream version. The initial release is 0.5.11, matching Litestream v0.5.11. Wrapper-only fixes (no Litestream update) use PEP 440 post-releases like 0.5.11.post1.

Installation

pip install django-litestream

Add to INSTALLED_APPS:

INSTALLED_APPS = [
    "django_litestream",
]

The binary is installed automatically on supported platforms (Linux/macOS x86_64 & arm64). On unsupported platforms, set a custom path:

LITESTREAM = {
    "bin_path": "/usr/local/bin/litestream",
}

Configuration

Configuration is generated dynamically from Django settings — no YAML file needed.

# settings.py
LITESTREAM = {
    "path_prefix": "",      # prepended to S3 replica paths
    "bin_path": "...",      # custom binary path (optional)
    "dbs": [                # databases to replicate
        {"path": "default"},
    ],
}

All Litestream config options are supported (addr, logging, mcp-addr, access-key-id, etc.).

Database aliases

Use Django database aliases instead of file paths wherever db_path is required:

python manage.py litestream restore default        # instead of /path/to/db.sqlite3
python manage.py litestream sync default

Auto-generated replicas

If no replica is specified for a database, an S3 replica is auto-generated using environment variables:

LITESTREAM = {
    "dbs": [{"path": "default"}],
}
# Uses: LITESTREAM_REPLICA_BUCKET, LITESTREAM_ACCESS_KEY_ID, LITESTREAM_SECRET_ACCESS_KEY

Explicit replica config:

LITESTREAM = {
    "dbs": [
        {
            "path": "default",
            "replica": {
                "type": "s3",
                "bucket": "my-bucket",
                "path": "db.sqlite3",
            },
        },
    ],
}

Multiple databases with path_prefix

DATABASES = {
    "default": {"ENGINE": "django.db.backends.sqlite3", "NAME": BASE_DIR / "db.sqlite3"},
    "cache":  {"ENGINE": "django.db.backends.sqlite3", "NAME": BASE_DIR / "cache.sqlite3"},
}

LITESTREAM = {
    "path_prefix": "myproject",
    "dbs": [
        {"path": "default"},           # → myproject/db.sqlite3
        {
            "path": "cache",
            "replica": {
                "type": "s3",
                "bucket": "my-cache-bucket",
                "path": "cache.sqlite3",
            },
        },
    ],
}

Custom commands

These commands are unique to django-litestream — they don't exist in upstream Litestream.

litestream config

Display the generated configuration in YAML format.

python manage.py litestream config

Useful for verifying your setup before running replication.

litestream verify

Checks backup integrity end-to-end: writes a verification row, waits for replication, restores the latest backup, and confirms the row exists.

python manage.py litestream verify default

Upstream commands

All Litestream commands are exposed as management commands. Run python manage.py litestream to see the full list. Key notes:

  • replicate: Run in production via a process manager. Use -exec to wrap your application server.
  • restore: Supports -timestamp, -generation, -index for point-in-time recovery.
  • Daemon control (info, list, register, unregister, start, stop): Communicate with a running replicate daemon over IPC.

The only difference from upstream is that Django database aliases work anywhere db_path is expected.

VFS Read Replicas

Read-only access to cloud-stored replicas without downloading the entire database. Pages are fetched on-demand.

pip install django-litestream[vfs]

This installs django-litestream, the django-litestream-vfs Django integration, and the upstream litestream-vfs package, which bundles the compiled VFS extension.

Setup

# settings.py
from django_litestream_vfs import get_vfs_databases

LITESTREAM = {
    "dbs": [{"path": "default"}],
    "vfs": {
        "prod_replica": "s3://mybucket/db.sqlite3",
    },
}

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": BASE_DIR / "db.sqlite3",
    },
    **get_vfs_databases(),  # adds VFS replicas
}

Usage

User.objects.using("prod_replica").all()  # read-only, on-demand page fetch

VFS replicas are read-only. Only x86_64 and arm64 supported. Multiple storage backends supported (S3, GCS, Azure Blob).

Note: the upstream litestream-vfs package currently ships wheels for Python 3.8–3.13. On Python 3.14 the VFS extra will not install until upstream publishes a cp314 wheel.

License

MIT. The bundled Litestream binary uses the Apache 2.0 license.

Metadata

Release files for django-litestream 0.5.18.post1

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-litestream 0.5.18.post1
File Size Uploaded Provenance Actions
django_litestream-0.5.18.post1.tar.gz 12.0 kB With provenance Details for django_litestream-0.5.18.post1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for django-litestream 0.5.18.post1
File Actions
django_litestream-0.5.18.post1-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for django_litestream-0.5.18.post1-py3-none-win_arm64.whl
django_litestream-0.5.18.post1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for django_litestream-0.5.18.post1-py3-none-win_amd64.whl
django_litestream-0.5.18.post1-py3-none-manylinux2014_x86_64.musllinux_1_1_x86_64.whl Python 3 none Linux musl 1.1+ x86-64, Linux glibc 2.17+ x86-64 Details for django_litestream-0.5.18.post1-py3-none-manylinux2014_x86_64.musllinux_1_1_x86_64.whl
django_litestream-0.5.18.post1-py3-none-manylinux2014_aarch64.musllinux_1_1_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64, Linux musl 1.1+ ARM64 Details for django_litestream-0.5.18.post1-py3-none-manylinux2014_aarch64.musllinux_1_1_aarch64.whl
django_litestream-0.5.18.post1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for django_litestream-0.5.18.post1-py3-none-macosx_11_0_arm64.whl
django_litestream-0.5.18.post1-py3-none-macosx_10_9_x86_64.whl Python 3 none macOS 10.9+ x86-64 Details for django_litestream-0.5.18.post1-py3-none-macosx_10_9_x86_64.whl
django_litestream-0.5.18.post1-py3-none-any.whl Python 3 none any Details for django_litestream-0.5.18.post1-py3-none-any.whl

Total release size: 322.7 MB

Release files / django_litestream-0.5.18.post1.tar.gz

Download URL django_litestream-0.5.18.post1.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
819ec7b5d54672c076e823b7e326e1965b7ed4cf91addf519dbe339fbe2ebb83
BLAKE2b-256 checksum
How to use checksums
fa8d0fac8df885d04b54cf2c51b66609b180092ae425b0e164aec06d55499d43
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 5, 2026.

Transparency log

Release files / django_litestream-0.5.18.post1-py3-none-win_arm64.whl

Download URL django_litestream-0.5.18.post1-py3-none-win_arm64.whl
Size 51.6 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
d2682ec503d66497ee0120bf5226d668dbe4ff4169a2f68b3d225b041c4bcedc
BLAKE2b-256 checksum
How to use checksums
e73a68e73e96b0f2ad432aaa01f1924cf844219c06b959c23504084ab50df93d
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 5, 2026.

Transparency log

Release files / django_litestream-0.5.18.post1-py3-none-win_amd64.whl

Download URL django_litestream-0.5.18.post1-py3-none-win_amd64.whl
Size 56.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
9af31800518bc5c018f07ad796f2872acf60f7c812e779594d64a9f0fc1fa162
BLAKE2b-256 checksum
How to use checksums
5d5ff284bbd96cfc99c25f0962b63139b619319e7aa20c02d82abbd89067488e
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 5, 2026.

Transparency log

Release files / django_litestream-0.5.18.post1-py3-none-manylinux2014_x86_64.musllinux_1_1_x86_64.whl

Download URL django_litestream-0.5.18.post1-py3-none-manylinux2014_x86_64.musllinux_1_1_x86_64.whl
Size 54.7 MB
Tags Linux glibc 2.17+ x86-64 Linux musl 1.1+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c5775ef04ff16e00bd811d621e656159838da24fa38709d33f34088ade229ea1
BLAKE2b-256 checksum
How to use checksums
7dfb432946b9ccda3aa76d527871a0f2c37d4b8080325ed380b4212b6253de9b
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 5, 2026.

Transparency log

Release files / django_litestream-0.5.18.post1-py3-none-manylinux2014_aarch64.musllinux_1_1_aarch64.whl

Download URL django_litestream-0.5.18.post1-py3-none-manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Size 51.0 MB
Tags Linux glibc 2.17+ ARM64 Linux musl 1.1+ ARM64 Python 3
SHA-256 checksum
How to use checksums
169916dbfc3ac110c5f5fd149c1de4dc009ec8997d596ea0fa46fa801746395e
BLAKE2b-256 checksum
How to use checksums
c457c695f257e8426f66d2671fc40a17eb5cc9183ea49ff472a3e25dcee92da1
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 5, 2026.

Transparency log

Release files / django_litestream-0.5.18.post1-py3-none-macosx_11_0_arm64.whl

Download URL django_litestream-0.5.18.post1-py3-none-macosx_11_0_arm64.whl
Size 52.9 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3efd5eef59449b515e476e958d449a8f80970f168ded950840bafc00f6b03c4a
BLAKE2b-256 checksum
How to use checksums
7179666e44148e330432e45e9e2e88262f7ea8d819dd7767d0f5235a12163d06
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 5, 2026.

Transparency log

Release files / django_litestream-0.5.18.post1-py3-none-macosx_10_9_x86_64.whl

Download URL django_litestream-0.5.18.post1-py3-none-macosx_10_9_x86_64.whl
Size 56.4 MB
Tags Python 3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
91fccbe8dde78422f229e48bfbf635aa26a6813ce72f23593065591252e06e00
BLAKE2b-256 checksum
How to use checksums
35f614bb0b9d6c25d0c62de36aba3404fb7ed06d695b4d73fbf945b704d488d1
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 5, 2026.

Transparency log

Release files / django_litestream-0.5.18.post1-py3-none-any.whl

Download URL django_litestream-0.5.18.post1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6d4c10e218e77bf8536605c6e5f98e06e172690a1c852be40bd1d1dc86d63cb
BLAKE2b-256 checksum
How to use checksums
a1447880426d19148c007e9039a2bef165d1f96e670bee01852cd01ce89a0d5f
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 5, 2026.

Transparency log

Security for django-litestream 0.5.18.post1

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

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for django_litestream-0.5.18.post1.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 5, 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.

Release history Release notifications | RSS feed

This release
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