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, shutdown-timeout, etc.) and forwarded verbatim; only path_prefix, bin_path and vfs are consumed by the wrapper.

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",
            },
        },
    ],
}

Per-database options

Every database-level option is passed through untouched; the wrapper only resolves the path alias and fills in an S3 replica when neither replica nor replicas is set:

LITESTREAM = {
    "dbs": [
        {
            "path": "default",
            "snapshot": {"interval": "6h", "retention": "168h"},
            "monitor-interval": "5s",
            "checkpoint-interval": "1m",
        },
    ],
}

dir-based entries (directory watching) are forwarded as-is, so pattern, recursive, watch, meta-dir, etc. work too. Durations use Go syntax (6h, 168h, 30m), not 7d/1w.

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.post2

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

Built distributions (wheels)

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

Total release size: 322.7 MB

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

Download URL django_litestream-0.5.18.post2.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
479392e4a1aff515c5baeac553c1d5400af69c2d12ce2a8b58508d53f1c6db03
BLAKE2b-256 checksum
How to use checksums
b16bc484905f3a7a794f6f097f184046040ebc9355b80d2a00c62cd2cd52fb8d
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.post2-py3-none-win_arm64.whl

Download URL django_litestream-0.5.18.post2-py3-none-win_arm64.whl
Size 51.6 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
a27438dc9431c6fd29e218ccc7e65354ed80dc6f83ca9e54378d857bf7c0e6e8
BLAKE2b-256 checksum
How to use checksums
b6d72a33a54f78aa3c1060f6eea8101629871385ca7b549443c75b0adf802349
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.post2-py3-none-win_amd64.whl

Download URL django_litestream-0.5.18.post2-py3-none-win_amd64.whl
Size 56.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
f23e6176d5e891f3f7d4cfc3d4d982e2687bcde758cfc4fc973d2c83563a9fd4
BLAKE2b-256 checksum
How to use checksums
306cdeea3ad876450ce8e90c1a7be9f0c4de08d588a63ae25b5e1cbf45375e39
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.post2-py3-none-manylinux2014_x86_64.musllinux_1_1_x86_64.whl

Download URL django_litestream-0.5.18.post2-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
11fd4bac310ff9ecc3a0050eaca64b5f6e980441c027ecd21b02320eb75ecc32
BLAKE2b-256 checksum
How to use checksums
3d3160a6dc6ca328dc129d9a145fbad5ce31b1f33ba12d79096e50c9c13cc9d7
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.post2-py3-none-manylinux2014_aarch64.musllinux_1_1_aarch64.whl

Download URL django_litestream-0.5.18.post2-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
f1c29b1656ef96f87c71df25a30e5af39eefa0aed5a0ec5893dd532b581370b6
BLAKE2b-256 checksum
How to use checksums
2f5090b345d1a3af1f600f67e917c0b92edbc2771862454a2a88e7052ab187bf
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.post2-py3-none-macosx_11_0_arm64.whl

Download URL django_litestream-0.5.18.post2-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
1f1b867237ec08f3036aa10a8eafac02dc2a2f637996f6625cf2a25904cc7200
BLAKE2b-256 checksum
How to use checksums
0bb438bf6ce21ee430023a1b45eaa0c60996c3de9e11fab609145e17acc4cb83
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.post2-py3-none-macosx_10_9_x86_64.whl

Download URL django_litestream-0.5.18.post2-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
4eb5933c47630b24c287a52d954c32b75ddb650cb2ed516647d7f05b20667eb0
BLAKE2b-256 checksum
How to use checksums
8e1f00829aa3d709a1c497469f1732c5608f8b480dc1ea231f995663681ac4b4
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.post2-py3-none-any.whl

Download URL django_litestream-0.5.18.post2-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d70e1bf1c878faddde79f76013aa859c11c94acada9e74141caa7cfc250d4ca5
BLAKE2b-256 checksum
How to use checksums
b6e6a7e4cd1945f284602df660aa87110087465cf7acd36e5409a7fe5370d192
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.post2

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.post2.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