Provide tables that expire after a time limit
Project description
datasette-ephemeral-tables
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
Built Distribution
File details
Details for the file datasette-ephemeral-tables-0.2.2.tar.gz
.
File metadata
- Download URL: datasette-ephemeral-tables-0.2.2.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc82373b5094e3e1b230699d9e739dffe0fd4fe35ccc525a1cd4637b914360e2 |
|
MD5 | 77951e8f2db90cbc0738cdd6e62232f8 |
|
BLAKE2b-256 | c2ec4a1f11e2eca8e4a7c75cb0507c78b43ed347593d0ecad39f79bf4379e785 |
File details
Details for the file datasette_ephemeral_tables-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: datasette_ephemeral_tables-0.2.2-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 357127d0377afef06c88ad43eb2b349f474ce53327fb19433cd7f6f2e61a4f53 |
|
MD5 | 40a889f43ee8945392aff71f862d2475 |
|
BLAKE2b-256 | fe98c0db21d229ade67ee74ac8f5697035ff3c1ea6bb93eea7936c3782d1cd10 |