Create a local copy of database files from a Datasette instance
Project description
datasette-clone
Create a local copy of database files from a Datasette instance.
See datasette-clone on my blog for background on this project.
How to install
$ pip install datasette-clone
Usage
This only works against Datasette instances running immutable databases (with the -i
option). Databases published using the datasette publish
command should be compatible with this tool.
To download copies of all .db
files from an instance, run:
datasette-clone https://latest.datasette.io
You can provide an optional second argument to specify a directory:
datasette-clone https://latest.datasette.io /tmp/here-please
The command stores its own copy of a databases.json
manifest and uses it to only download databases that have changed the next time you run the command.
It also stores a copy of the instance's metadata.json
to ensure you have a copy of any source and licensing information for the downloaded databases.
If your instance is protected by an API token, you can use --token
to provide it:
datasette-clone https://latest.datasette.io --token=xyz
For verbose output showing what the tool is doing, use -v
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for datasette_clone-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c0ddc803c1b9c990c25d97de6fa0c3cbde59ecbe6ea39c1086835b68a8d8258 |
|
MD5 | 61d5b87e6e7a86315206ca48f890ed66 |
|
BLAKE2b-256 | d5b96eaccc62deb1944c78690e4f9ffd8433a774a8a8e23b3666e94f09f10a7a |