datasette-mutable-downloads
Enable downloading mutable databases.
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-mutable-downloads
Usage
You can now download a mutable database on its database page, just as you can for immutable databases.
Example: https://dux.fly.dev/cooking
Notes
This is achieved by a somewhat gross monkeypatch of the DatabaseDownload
view.
We detect if the database is mutable. If it is, we first create a copy via
VACUUM INTO.
We then stream that file to the user, and delete it.
This requires SQLite 3.27.0 or newer (Feb 2019).
NOTE
The act of
VACUUM INTOcould be resource intensive if your database is large. If you expose your Datasette to the Internet, you may wish to restrict this to only authenticated users.To do that, add a permissions block in your metadata.json:
"permissions": { "view-database-download": { "gh_id": "*" } }
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-mutable-downloads
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Metadata
Release files for datasette-mutable-downloads 0.1.2
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-mutable-downloads-0.1.2.tar.gz | 8.2 kB | Without provenance | Details for datasette-mutable-downloads-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datasette_mutable_downloads-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for datasette_mutable_downloads-0.1.2-py3-none-any.whl |
Total release size: 16.9 kB
Release files / datasette-mutable-downloads-0.1.2.tar.gz
| Download URL | datasette-mutable-downloads-0.1.2.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7a9bb0538db435cfae463ff8b0eb9ec7959e02f9909a09a5f8464aa5bed088f
|
|
BLAKE2b-256 checksum How to use checksums |
0aa34cb795ac266ff0cf73859e4078174fca76ed92d87193d8077f9f7363c7dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / datasette_mutable_downloads-0.1.2-py3-none-any.whl
| Download URL | datasette_mutable_downloads-0.1.2-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
254415cc1d5c286f0b58f800516f34f34953df6b453d5f828072642cf163201b
|
|
BLAKE2b-256 checksum How to use checksums |
bce2de6b2f5475045e4d807f0ee299e9f808dd1127f41ee7beae60176d5b77b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for datasette-mutable-downloads 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.