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

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

Built distributions (wheels)

Table of built distributions (wheels) for django-litestream 0.5.18
File Actions
django_litestream-0.5.18-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for django_litestream-0.5.18-py3-none-win_arm64.whl
django_litestream-0.5.18-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for django_litestream-0.5.18-py3-none-win_amd64.whl
django_litestream-0.5.18-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-py3-none-manylinux2014_x86_64.musllinux_1_1_x86_64.whl
django_litestream-0.5.18-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-py3-none-manylinux2014_aarch64.musllinux_1_1_aarch64.whl
django_litestream-0.5.18-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for django_litestream-0.5.18-py3-none-macosx_11_0_arm64.whl
django_litestream-0.5.18-py3-none-macosx_10_9_x86_64.whl Python 3 none macOS 10.9+ x86-64 Details for django_litestream-0.5.18-py3-none-macosx_10_9_x86_64.whl
django_litestream-0.5.18-py3-none-any.whl Python 3 none any Details for django_litestream-0.5.18-py3-none-any.whl

Total release size: 229.6 MB

Release files / django_litestream-0.5.18.tar.gz

Download URL django_litestream-0.5.18.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2d844e616ff3240c6ca2c1279ad076d27838b2df2ae710b8b85dfd73cf2c1af5
BLAKE2b-256 checksum
How to use checksums
9cb392ce7c28caa9c5f963e65208b8fcbb4be345b563d2127c05ab94a690e0f8
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 4, 2026.

Transparency log

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

Download URL django_litestream-0.5.18-py3-none-win_arm64.whl
Size 36.7 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
667dc71111aa0e9e198b30c0c6f4b3a882c601ad824a9e590322aac0ddc5108f
BLAKE2b-256 checksum
How to use checksums
87fcbd28e8d9b6fa23e0d81863b4a51057b9607209d3e47d9b6a7a55bd78b979
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 4, 2026.

Transparency log

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

Download URL django_litestream-0.5.18-py3-none-win_amd64.whl
Size 40.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
371f6e8ea220afab1c45dd1a0ce31f38c1edb1cdf83f9a966d69f637797c706d
BLAKE2b-256 checksum
How to use checksums
04616b2e8bc4f1a93344c19f06c0e01a17bb2f9cfd2311f7a3b01c50d6948666
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 4, 2026.

Transparency log

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

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

Transparency log

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

Download URL django_litestream-0.5.18-py3-none-manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Size 36.3 MB
Tags Linux glibc 2.17+ ARM64 Linux musl 1.1+ ARM64 Python 3
SHA-256 checksum
How to use checksums
afd9ec44a2d4c4f0e1f3965fd21b3072df0cf1f84473f82204c09640c8f521f8
BLAKE2b-256 checksum
How to use checksums
6da028db0467dd6ce111a086f85a4b7a1522403f37ac9fb6d152abe419cd3d35
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 4, 2026.

Transparency log

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

Download URL django_litestream-0.5.18-py3-none-macosx_11_0_arm64.whl
Size 37.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c321a940e6358d10c293f6858a9ff27d63071739d76552ff1736548af04d4d3c
BLAKE2b-256 checksum
How to use checksums
d7cc180bf3937c92963696c808bba9b5e39b4f2c5fcd4cd9691e7d40519bb42c
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 4, 2026.

Transparency log

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

Download URL django_litestream-0.5.18-py3-none-macosx_10_9_x86_64.whl
Size 40.1 MB
Tags Python 3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
0c16b97888397c6d095b52b8c8869450f840ed0241f2a3831ab4755a13979ce4
BLAKE2b-256 checksum
How to use checksums
80094c6684376acad6de8c6d9a5fb5690846d20075d1bfe97dc3b6a1a141e700
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 4, 2026.

Transparency log

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

Download URL django_litestream-0.5.18-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43b91d15b8bd9a0fa9ddab448b08c200eee67abf8df14c9bb8c65ab31f93389d
BLAKE2b-256 checksum
How to use checksums
76ed53e9ddd4bcb47b3e06d6dbef8a5d38fdf6f9f5a60f31d9d05cab2fe9ff59
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 4, 2026.

Transparency log

Security for django-litestream 0.5.18

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.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 4, 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

0.5.18 This release

8 release files Full provenance

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