Skip to main content

Provide tables that expire after a time limit

Project description

datasette-ephemeral-tables

PyPI Changelog Tests License

Provide tables that expire after a time limit

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-ephemeral-tables

Usage

Once installed, this plugin will ensure Datasette starts running with a new named in-memory database called ephemeral.

Any tables created in this database will be automatically dropped five minutes after creation.

Configuration

All plugin settings are optional. The full set of settings in metadata.yml looks like this:

plugins:
    datasette-ephemeral-tables:
        # The name of the in-memory database created by the plugin:
        database: ephemeral
        # After how many seconds should tables be dropped?
        table_ttl: 300
        # How often should the plugin check for expired tables (in seconds)?
        check_interval: 2

The figures shown here are the default values.

Development

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

cd datasette-ephemeral-tables
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-ephemeral-tables-0.2.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

datasette_ephemeral_tables-0.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file datasette-ephemeral-tables-0.2.tar.gz.

File metadata

File hashes

Hashes for datasette-ephemeral-tables-0.2.tar.gz
Algorithm Hash digest
SHA256 353dc44a481ea2d8a96648829ae780b2c2e8fca45f37a2b7f1220bdddbdb2072
MD5 e9a39aac8f00e1de75cde5b165a4884d
BLAKE2b-256 91e08058bf709d05032b3f3d4cfd8fd4c58c7c20d0741222e56942fb6f00fd5c

See more details on using hashes here.

File details

Details for the file datasette_ephemeral_tables-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_ephemeral_tables-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 50faa5ffac99ba912dc73d5e95726277126a91695d1e21894d9a60cbf13ce9c7
MD5 7978df5054c7b271e4b32dfae2b32d72
BLAKE2b-256 e8197552c2276e8fed1f2b4b2e6974c36b25a9a5590c94c967786811e1dd1bf1

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