Skip to main content

No project description provided

Project description

datasette-litestream

PyPI Changelog Tests License

An experimental Datasette <-> Litestream plugin.

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-litestream

Usage

plugins:
  datasette-litestream:
    metrics-addr: :9090
    all-replicate:
      - file://$PWD/$DB-backup

Replicate a single database to a local directory

databases:
  my_database:
    plugins:
      datasette-litestream:
        replicas:
          - path: ./my_database-backup

Replicate a single database to S3

databases:
  my_database:
    plugins:
      datasette-litestream:
        replicas:
          - url: s3://my-bucket/my_database
  1. Environment variables LITESTREAM_ACCESS_KEY_ID and LITESTREAM_SECRET_ACCESS_KEY. AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
  2. Environment variables with access-key-id and secret-access-key config options.
  3. Raw values in secret-access-key and secret-access-key config options.

Replicate all databases

plugins:
  datasette-litestream:
    all-replicate:
      - s3://my-bucket/$DB

Config

Top-level

The following are valid keys that are allowed when specifying top-evel

  • all-replicate
  • access-key-id
  • secret-access-key
  • metrics-addr

None of these keys are required.

Example:

plugins:
  datasette-litestream:
    all-replicate:
      - XXX
      - YYY
    access-key-id: $YOUR_KEY
    secret-access-key: $YOUR_SECRET
    metrics-addr: :5001

Database-level

  • replicas
  • monitor-interval
  • checkpoint-interval
  • min-checkpoint-page-count
  • max-checkpoint-page-count
databases:
  my_database:
    plugins:
      datasette-litestream:
        replicas:
          - XXX
          - XXX
        monitor-interval: XXX
        checkpoint-interval: XXX
        min-checkpoint-page-count: XXX
        max-checkpoint-page-count: XXX

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-litestream
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Download files

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

Source Distribution

datasette-litestream-0.0.1a10.tar.gz (10.9 kB view details)

Uploaded Source

Built Distributions

datasette_litestream-0.0.1a10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.7 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

datasette_litestream-0.0.1a10-py3-none-macosx_11_0_arm64.whl (9.1 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

datasette_litestream-0.0.1a10-py3-none-macosx_10_6_x86_64.whl (10.0 MB view details)

Uploaded Python 3 macOS 10.6+ x86-64

datasette_litestream-0.0.1a10-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file datasette-litestream-0.0.1a10.tar.gz.

File metadata

File hashes

Hashes for datasette-litestream-0.0.1a10.tar.gz
Algorithm Hash digest
SHA256 71a9ba835475fb0a292b531cc27afde25c1ac5156a41489b906dc47a187d2c78
MD5 dab53834f2e2d7d42d19eea675e352ef
BLAKE2b-256 8e4ffb931d3a53d8a8b9db6b56eb540f8ce4f392a1da0c9491a12103da81b01e

See more details on using hashes here.

File details

Details for the file datasette_litestream-0.0.1a10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for datasette_litestream-0.0.1a10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 96ba3db9838deab3417e17a0f9f8b0fe903d805f2ae4cc622ce77f23e4f56eb3
MD5 fdd6e67de7aede4637e3abe387e30896
BLAKE2b-256 ef7230ebc87380016cade5e871b83b3afcddecb9db0d9cec0b2a7727361c059a

See more details on using hashes here.

File details

Details for the file datasette_litestream-0.0.1a10-py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for datasette_litestream-0.0.1a10-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 01eb38cc9d71da9e168b12e53697b34404210911c5f3833693bc8559fb74c521
MD5 b72b05df522817e9411ac384eb9175a4
BLAKE2b-256 77a970063b1ac9109a1d5cb8ff6425ed1fdf45654e94556565735fec4ce104fb

See more details on using hashes here.

File details

Details for the file datasette_litestream-0.0.1a10-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for datasette_litestream-0.0.1a10-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 711b663d61a312be96c95d1d9d6a17e5095ad22cffcff3369314af5922cf3b5c
MD5 ee46107e2be04809c9cf32be66f427dd
BLAKE2b-256 47346a8c23f8f4d5bdea5a158005e8fe573509550acc32b9a2a64138cce6db1e

See more details on using hashes here.

File details

Details for the file datasette_litestream-0.0.1a10-py3-none-macosx_10_6_x86_64.whl.

File metadata

File hashes

Hashes for datasette_litestream-0.0.1a10-py3-none-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 c254fe7955a583612f823348adb71594f6741ed60541a02274177d15429d4fdc
MD5 d3afe7132fcc81afbce47b8eca7715e3
BLAKE2b-256 cb9429c80d7d81f783c7996dd016266a6d93c73f5e3f0b7a39e1b5000b5466fc

See more details on using hashes here.

File details

Details for the file datasette_litestream-0.0.1a10-py3-none-linux_armv7l.whl.

File metadata

File hashes

Hashes for datasette_litestream-0.0.1a10-py3-none-linux_armv7l.whl
Algorithm Hash digest
SHA256 265337d03a7565f49bd6ce05d42edc2ba5a012a3f020001f15b3afa9c9e289fa
MD5 3b3dfa9a584a33a1db6281fe0b9368e9
BLAKE2b-256 0a32f31769c3a3497798e5f7f21dfcf731901b3436edfb2c71790b14f0f9363d

See more details on using hashes here.

File details

Details for the file datasette_litestream-0.0.1a10-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_litestream-0.0.1a10-py3-none-any.whl
Algorithm Hash digest
SHA256 5aa262c7a75bdcc2624e7ef7bc10c3773a8088b44dae56b66355e3b9d7b4d52b
MD5 115a7c7fcbd0168ba096e24a49028614
BLAKE2b-256 c74804285b84d7f19657e57d8d7d748ced6680691428dd651a9728544ea08a69

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page