datasette-demo-dbs
Fetch missing demo DBs from URLs when Datasette first starts
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-demo-dbs
Configuration
Configure the plugin in your Datasette metadata (YAML or JSON). You specify:
path: directory on disk where downloaded .db files will be stored (defaults to current directory)dbs: a mapping of database name to the URL of the SQLite database file
Example metadata.yml:
plugins:
datasette-demo-dbs:
path: ./demo-dbs
dbs:
demo: https://example.com/path/to/demo.db
census: https://example.com/path/to/census.db
Equivalent metadata.json:
{
"plugins": {
"datasette-demo-dbs": {
"path": "./demo-dbs",
"dbs": {
"demo": "https://example.com/path/to/demo.db",
"census": "https://example.com/path/to/census.db"
}
}
}
}
How it works
On Datasette startup, for each entry in dbs:
- If
path/<name>.dbalready exists, it is left as-is and loaded into Datasette. - If a marker file
path/<name>.deletedexists, the download is skipped. - Otherwise, the plugin downloads the content from the URL (following redirects), streams it to
path/<name>.db, and registers that database in Datasette under the given name.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-demo-dbs
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
python -m pytest
Metadata
Release files for datasette-demo-dbs 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datasette_demo_dbs-0.1.1.tar.gz | 7.9 kB | With provenance | Details for datasette_demo_dbs-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datasette_demo_dbs-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for datasette_demo_dbs-0.1.1-py3-none-any.whl |
Total release size: 15.4 kB
Release files / datasette_demo_dbs-0.1.1.tar.gz
| Download URL | datasette_demo_dbs-0.1.1.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10696bd70b0209d033faf61089fe00c69e6a69e3b4cdb5a40991929dcba93b11
|
|
BLAKE2b-256 checksum How to use checksums |
a3af2b012f6af95dc94f38fccdd22627549dc7e9c1cd02dec88700580fa2eb14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2025.
Transparency logRelease files / datasette_demo_dbs-0.1.1-py3-none-any.whl
| Download URL | datasette_demo_dbs-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0fdc1d52f1c6356089719ac2eca604abcea5f5f56941ff77011759de8e81ec67
|
|
BLAKE2b-256 checksum How to use checksums |
64adb12ef75725f50f5a98b4019d07e019736c1432ca58268c784219900b371d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2025.
Transparency logSecurity for datasette-demo-dbs 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for datasette_demo_dbs-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.