home / content / repos

repos: 255460347

This data as json

id node_id name full_name private owner html_url description fork created_at updated_at pushed_at homepage size stargazers_count watchers_count language has_issues has_projects has_downloads has_wiki has_pages forks_count archived disabled open_issues_count license topics forks open_issues watchers default_branch permissions temp_clone_token organization network_count subscribers_count readme readme_html allow_forking visibility is_template template_repository web_commit_signoff_required has_discussions
255460347 MDEwOlJlcG9zaXRvcnkyNTU0NjAzNDc= datasette-clone simonw/datasette-clone 0 9599 https://github.com/simonw/datasette-clone Create a local copy of database files from a Datasette instance 0 2020-04-13T23:05:41Z 2021-06-08T15:33:21Z 2021-02-22T19:32:36Z   20 2 2 Python 1 1 1 1 0 0 0 0 0 apache-2.0 ["datasette", "datasette-io", "datasette-tool"] 0 0 2 main {"admin": false, "push": false, "pull": false}     0 1 # datasette-clone [![PyPI](https://img.shields.io/pypi/v/datasette-clone.svg)](https://pypi.org/project/datasette-clone/) [![Changelog](https://img.shields.io/github/v/release/simonw/datasette-clone?include_prereleases&label=changelog)](https://github.com/simonw/datasette-clone/releases) [![Tests](https://github.com/simonw/datasette-clone/workflows/Test/badge.svg)](https://github.com/simonw/datasette-clone/actions?query=workflow%3ATest) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-clone/blob/main/LICENSE) Create a local copy of database files from a Datasette instance. See [datasette-clone](https://simonwillison.net/2020/Apr/14/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`. <div id="readme" class="md" data-path="README.md"><article class="markdown-body entry-content container-lg" itemprop="text"><h1><a id="user-content-datasette-clone" class="anchor" aria-hidden="true" href="#user-content-datasette-clone"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>datasette-clone</h1> <p><a href="https://pypi.org/project/datasette-clone/" rel="nofollow"><img src="https://camo.githubusercontent.com/17cc348c1197fd918ac911e525efd416a5d4ca5d3f00729cbf85c930ac5dbde6/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f6461746173657474652d636c6f6e652e737667" alt="PyPI" data-canonical-src="https://img.shields.io/pypi/v/datasette-clone.svg" style="max-width:100%;"></a> <a href="https://github.com/simonw/datasette-clone/releases"><img src="https://camo.githubusercontent.com/9f8615567ed0f9b4d38d5f69dafcc8ae2fa97aa13895779172645064f16fcc9f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f73696d6f6e772f6461746173657474652d636c6f6e653f696e636c7564655f70726572656c6561736573266c6162656c3d6368616e67656c6f67" alt="Changelog" data-canonical-src="https://img.shields.io/github/v/release/simonw/datasette-clone?include_prereleases&amp;label=changelog" style="max-width:100%;"></a> <a href="https://github.com/simonw/datasette-clone/actions?query=workflow%3ATest"><img src="https://github.com/simonw/datasette-clone/workflows/Test/badge.svg" alt="Tests" style="max-width:100%;"></a> <a href="https://github.com/simonw/datasette-clone/blob/main/LICENSE"><img src="https://camo.githubusercontent.com/1698104e976c681143eb0841f9675c6f802bb7aa832afc0c7a4e719b1f3cf955/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322e302d626c75652e737667" alt="License" data-canonical-src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" style="max-width:100%;"></a></p> <p>Create a local copy of database files from a Datasette instance.</p> <p>See <a href="https://simonwillison.net/2020/Apr/14/datasette-clone/" rel="nofollow">datasette-clone</a> on my blog for background on this project.</p> <h2><a id="user-content-how-to-install" class="anchor" aria-hidden="true" href="#user-content-how-to-install"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>How to install</h2> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="$ pip install datasette-clone "><pre><code>$ pip install datasette-clone </code></pre></div> <h2><a id="user-content-usage" class="anchor" aria-hidden="true" href="#user-content-usage"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Usage</h2> <p>This only works against Datasette instances running immutable databases (with the <code>-i</code> option). Databases published using the <code>datasette publish</code> command should be compatible with this tool.</p> <p>To download copies of all <code>.db</code> files from an instance, run:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="datasette-clone https://latest.datasette.io "><pre><code>datasette-clone https://latest.datasette.io </code></pre></div> <p>You can provide an optional second argument to specify a directory:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="datasette-clone https://latest.datasette.io /tmp/here-please "><pre><code>datasette-clone https://latest.datasette.io /tmp/here-please </code></pre></div> <p>The command stores its own copy of a <code>databases.json</code> manifest and uses it to only download databases that have changed the next time you run the command.</p> <p>It also stores a copy of the instance's <code>metadata.json</code> to ensure you have a copy of any source and licensing information for the downloaded databases.</p> <p>If your instance is protected by an API token, you can use <code>--token</code> to provide it:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="datasette-clone https://latest.datasette.io --token=xyz "><pre><code>datasette-clone https://latest.datasette.io --token=xyz </code></pre></div> <p>For verbose output showing what the tool is doing, use <code>-v</code>.</p> </article></div>            

Links from other tables

  • 6 rows from repo in releases
Powered by Datasette · Queries took 1.129ms