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.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

datasette_ephemeral_tables-0.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for datasette-ephemeral-tables-0.1.tar.gz
Algorithm Hash digest
SHA256 1f897966e7a3908499a726cc2dbe439d3093335368248fb9d33a915aeed77a70
MD5 eaa6c6bf03e8080bf59d3e55b1275eb8
BLAKE2b-256 13ff3a7089722569904b65d08f1e4b2630c9c94983468f5d20276876dd4b3222

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for datasette_ephemeral_tables-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c63fb7d089ca18a5e84f99dfb1f4d4be4e6db0ee5d2e2863deabccd07727e38
MD5 335d64c66fcc9acda0979fc741c99998
BLAKE2b-256 ac0b861509cbe217b3516e36100fcd0ab655f7d17ee608145f8d0166e939daf6

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