Socket
Book a DemoInstallSign in
Socket

datasette-litestream

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datasette-litestream

0.0.1a10
pipPyPI
Maintainers
1

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
  • Environment variables LITESTREAM_ACCESS_KEY_ID and LITESTREAM_SECRET_ACCESS_KEY. AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
  • Environment variables with access-key-id and secret-access-key config options.
  • 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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.