Skip to main content

Part of https://github.com/simonw/datasette-app

Project description

datasette-app-support

PyPI Changelog Tests License

Part of https://github.com/simonw/datasette-app

Installation

Install this plugin in the same environment as Datasette.

$ datasette install datasette-app-support

API endpoints

This plugin exposes APIs that are called by the Electron wrapper.

/-/open-database-file

POST /-/open-database-file
{"path": "/path/to/file.db"}

Attaches a new database file to the running Datasette instance - used by the "Open Database..." menu option.

Returns HTTP 200 if it works, 400 with an "error" JSON string message if it fails.

/-/open-csv-file

POST /-/open-csv-file
{"path": "/path/to/file.csv"}

Impors a CSV or TSV file into the default /temporary in-memory database. Used by the "Open CSV/TSV..." menu option.

Returns HTTP 200 if it works, 400 with an "error" JSON string message if it fails.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-app-support
python3 -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasette-app-support-0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

datasette_app_support-0.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file datasette-app-support-0.2.tar.gz.

File metadata

  • Download URL: datasette-app-support-0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for datasette-app-support-0.2.tar.gz
Algorithm Hash digest
SHA256 5db7ec87ee0af48977cae8df881934c9909f8312454dbc8dc91f9cef6e75f4f2
MD5 ba8951dd65a0b386ee9b7013beaf43e7
BLAKE2b-256 04615c12e7568ecc119511ac3524702012d7f4a11002ddc93486e069ae3d4fe7

See more details on using hashes here.

File details

Details for the file datasette_app_support-0.2-py3-none-any.whl.

File metadata

  • Download URL: datasette_app_support-0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for datasette_app_support-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a829d2ba9ed4f1b576138d5ab852efd7a992d6697dd4c48610e8466f819bf9e4
MD5 3619eb4249b9c9e8c3ccba541cdd9956
BLAKE2b-256 26e943406f96fb90c9f85b441e3981674502d0b87f50acda2f0f680fcb26b284

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page