datasette-ephemeral-tables


Namedatasette-ephemeral-tables JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/simonw/datasette-ephemeral-tables
SummaryProvide tables that expire after a time limit
upload_time2022-12-02 00:37:38
maintainer
docs_urlNone
authorSimon Willison
requires_python>=3.7
licenseApache License, Version 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # datasette-ephemeral-tables

[![PyPI](https://img.shields.io/pypi/v/datasette-ephemeral-tables.svg)](https://pypi.org/project/datasette-ephemeral-tables/)
[![Changelog](https://img.shields.io/github/v/release/simonw/datasette-ephemeral-tables?include_prereleases&label=changelog)](https://github.com/simonw/datasette-ephemeral-tables/releases)
[![Tests](https://github.com/simonw/datasette-ephemeral-tables/workflows/Test/badge.svg)](https://github.com/simonw/datasette-ephemeral-tables/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-ephemeral-tables/blob/main/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:

```yaml
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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/simonw/datasette-ephemeral-tables",
    "name": "datasette-ephemeral-tables",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Simon Willison",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/c2/ec/4a1f11e2eca8e4a7c75cb0507c78b43ed347593d0ecad39f79bf4379e785/datasette-ephemeral-tables-0.2.2.tar.gz",
    "platform": null,
    "description": "# datasette-ephemeral-tables\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-ephemeral-tables.svg)](https://pypi.org/project/datasette-ephemeral-tables/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/datasette-ephemeral-tables?include_prereleases&label=changelog)](https://github.com/simonw/datasette-ephemeral-tables/releases)\n[![Tests](https://github.com/simonw/datasette-ephemeral-tables/workflows/Test/badge.svg)](https://github.com/simonw/datasette-ephemeral-tables/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-ephemeral-tables/blob/main/LICENSE)\n\nProvide tables that expire after a time limit\n\n## Installation\n\nInstall this plugin in the same environment as Datasette.\n\n    datasette install datasette-ephemeral-tables\n\n## Usage\n\nOnce installed, this plugin will ensure Datasette starts running with a new named in-memory database called `ephemeral`.\n\nAny tables created in this database will be automatically dropped five minutes after creation.\n\n## Configuration\n\nAll plugin settings are optional. The full set of settings in `metadata.yml` looks like this:\n\n```yaml\nplugins:\n    datasette-ephemeral-tables:\n        # The name of the in-memory database created by the plugin:\n        database: ephemeral\n        # After how many seconds should tables be dropped?\n        table_ttl: 300\n        # How often should the plugin check for expired tables (in seconds)?\n        check_interval: 2\n```\nThe figures shown here are the default values.\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n\n    cd datasette-ephemeral-tables\n    python3 -m venv venv\n    source venv/bin/activate\n\nNow install the dependencies and test dependencies:\n\n    pip install -e '.[test]'\n\nTo run the tests:\n\n    pytest\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "Provide tables that expire after a time limit",
    "version": "0.2.2",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "40a889f43ee8945392aff71f862d2475",
                "sha256": "357127d0377afef06c88ad43eb2b349f474ce53327fb19433cd7f6f2e61a4f53"
            },
            "downloads": -1,
            "filename": "datasette_ephemeral_tables-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "40a889f43ee8945392aff71f862d2475",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8272,
            "upload_time": "2022-12-02T00:37:37",
            "upload_time_iso_8601": "2022-12-02T00:37:37.084437Z",
            "url": "https://files.pythonhosted.org/packages/fe/98/c0db21d229ade67ee74ac8f5697035ff3c1ea6bb93eea7936c3782d1cd10/datasette_ephemeral_tables-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "77951e8f2db90cbc0738cdd6e62232f8",
                "sha256": "bc82373b5094e3e1b230699d9e739dffe0fd4fe35ccc525a1cd4637b914360e2"
            },
            "downloads": -1,
            "filename": "datasette-ephemeral-tables-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "77951e8f2db90cbc0738cdd6e62232f8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 7681,
            "upload_time": "2022-12-02T00:37:38",
            "upload_time_iso_8601": "2022-12-02T00:37:38.194166Z",
            "url": "https://files.pythonhosted.org/packages/c2/ec/4a1f11e2eca8e4a7c75cb0507c78b43ed347593d0ecad39f79bf4379e785/datasette-ephemeral-tables-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-02 00:37:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "simonw",
    "github_project": "datasette-ephemeral-tables",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "datasette-ephemeral-tables"
}
        
Elapsed time: 0.01607s