{"id":15432975,"url":"https://github.com/simonw/datasette-upload-dbs","last_synced_at":"2025-04-16T05:57:06.735Z","repository":{"id":57680079,"uuid":"489156146","full_name":"simonw/datasette-upload-dbs","owner":"simonw","description":"Upload SQLite database files to Datasette","archived":false,"fork":false,"pushed_at":"2024-05-03T00:12:03.000Z","size":105,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-14T09:37:11.133Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-05T23:36:51.000Z","updated_at":"2024-06-25T03:30:15.000Z","dependencies_parsed_at":"2024-05-03T01:31:24.129Z","dependency_job_id":"27515da4-7308-43ab-a187-7c54e24b27e3","html_url":"https://github.com/simonw/datasette-upload-dbs","commit_stats":{"total_commits":28,"total_committers":2,"mean_commits":14.0,"dds":0.0357142857142857,"last_synced_commit":"b86411d567b6722da26fbad21a613b3d1a916424"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-upload-dbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-upload-dbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-upload-dbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-upload-dbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonw","download_url":"https://codeload.github.com/simonw/datasette-upload-dbs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249205658,"owners_count":21229968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T18:29:53.772Z","updated_at":"2025-04-16T05:57:06.718Z","avatar_url":"https://github.com/simonw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# datasette-upload-dbs\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-upload-dbs.svg)](https://pypi.org/project/datasette-upload-dbs/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/datasette-upload-dbs?include_prereleases\u0026label=changelog)](https://github.com/simonw/datasette-upload-dbs/releases)\n[![Tests](https://github.com/simonw/datasette-upload-dbs/workflows/Test/badge.svg)](https://github.com/simonw/datasette-upload-dbs/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-upload-dbs/blob/main/LICENSE)\n\nUpload SQLite database files to Datasette\n\n## Installation\n\nInstall this plugin in the same environment as Datasette.\n\n    datasette install datasette-upload-dbs\n\n## Configuration\n\nThis plugin requires you to configure a directory in which uploaded files will be stored.\n\nOn startup, Datasette will automatically load any SQLite files that it finds in that directory. This means it is safe to restart your server in between file uploads.\n\nTo configure the directory as `/home/datasette/uploads`, add this to a `metadata.yml` configuration file:\n\n```yaml\nplugins:\n  datasette-upload-dbs:\n    directory: /home/datasette/uploads\n```\n\nOr if you are using `metadata.json`:\n\n```json\n{\n  \"plugins\": {\n    \"datasette-upload-dbs\": {\n      \"directory\": \"/home/datasette/uploads\"\n    }\n  }\n}\n```\nYou can use `\".\"` for the current folder when the server starts, or `\"uploads\"` for a folder relative to that folder. The folder will be created on startup if it does not already exist.\n\nThen start Datasette like this:\n\n    datasette -m metadata.yml\n\nThe plugin defaults to loading all databases in the configured directory.\n\nYou can disable this by adding the following setting:\n```\n\"skip_startup_scan\": true\n```\n## Usage\n\nOnly users with the `upload-dbs` permission will be able to upload files. The `root` user has this permission by default - other users can be granted access using permission plugins, see the [Permissions](https://docs.datasette.io/en/stable/authentication.html#permissions) documentation for details.\n\nTo start Datasette as the root user, run this:\n\n    datasette -m metadata.yml --root\n\nAnd follow the link that is displayd on the console.\n\nIf a user has that permission they will see an \"Upload database\" link in the navigation menu.\n\nThis will take them to `/-/upload-dbs` where they will be able to upload database files, by selecting them or by dragging them onto the drop area.\n\n![Animated demo showing a file being dropped onto a box, then uploading and redirecting to the database page](https://github.com/simonw/datasette-upload-dbs/raw/main/upload-demo.gif)\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n\n    cd datasette-upload-dbs\n    python3 -m venv venv\n    source venv/bin/activate\n\nNow install the dependencies and test dependencies:\n\n    pip install -e '.[test]'\n\nTo run the tests:\n\n    pytest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fdatasette-upload-dbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonw%2Fdatasette-upload-dbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fdatasette-upload-dbs/lists"}