Skip to main content

Copy database files into an in-memory database on startup

Project description

datasette-copy-to-memory

PyPI Changelog Tests License

Copy database files into an in-memory database on startup

This plugin is highly experimental. It currently exists to support Datasette performance research, and is not designed for actual production usage.

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-copy-to-memory

Usage

On startup, Datasette will create an in-memory named database for each attached database. This database will have the same name but with _memory at the end.

So running this:

datasette fixtures.db

Will serve two databases: the original at /fixtures and the in-memory copy at /fixtures_memory.

Development

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

cd datasette-copy-to-memory
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-copy-to-memory-0.1a0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

datasette_copy_to_memory-0.1a0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file datasette-copy-to-memory-0.1a0.tar.gz.

File metadata

File hashes

Hashes for datasette-copy-to-memory-0.1a0.tar.gz
Algorithm Hash digest
SHA256 7f7219a9e1f65b66fb08fec574521a2a04f70db12a049b1437a4481c5b9ee221
MD5 9542764c22f4b6f8bc747005772e1deb
BLAKE2b-256 87f401c6db07e3ea8657d9c1784ba8dbbe36aec4de1df9e867c033f4a109de47

See more details on using hashes here.

File details

Details for the file datasette_copy_to_memory-0.1a0-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_copy_to_memory-0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cce4def4e8b1b43cb64304a5fbdb27b31e5065eb6b4dc313e9021a6b5a80664
MD5 5efc4d1371030520438809cffe9f63d7
BLAKE2b-256 1ce3b66e5d666463d8ba1c0d630ee19a3994e0a65f3b4ee23eec4845592543e0

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