Skip to main content

Django plugin to run Datasette inside of Django

Project description

django-plugin-datasette

PyPI Changelog Tests License

Run Datasette inside Django as a DJP plugin

Installation

First configure your Django project to use DJP. Be sure to configure your asgi.py file.

Then install this plugin in the same environment as your Django application.

pip install django-plugin-datasette

Usage

Once installed, /-/datasette/ will serve a Datasette instance that exposes the contents of any SQLite databases used by Django.

You will need to run Django using ASGI. One way to do that is with Uvicorn:

pip install uvicorn
uvicorn myproject.asgi:application

Warning: This will expose your entire Django database to anyone who visits /-/datasette/. The auth_user.password field is automatically redacted, but you should still take care that this does not expose any other sensitive information.

Development

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

cd django-plugin-datasette
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

python -m 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

django_plugin_datasette-0.2.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

django_plugin_datasette-0.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file django_plugin_datasette-0.2.tar.gz.

File metadata

  • Download URL: django_plugin_datasette-0.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for django_plugin_datasette-0.2.tar.gz
Algorithm Hash digest
SHA256 b31d6a568408fa32c3dfdb044ade956061ca3afa05212de60aac105992d2cfb1
MD5 542a44866a79cd8d98f8d6132ec338ed
BLAKE2b-256 c6e5ded9b4217522816093d86d2d0224b76352e8020278acf97c93dfe5eecf90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_plugin_datasette-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8e747be9381372a5fcaa9b5cfa0b7600d8b0bf61b302a4e0f010aca8ddad7e3b
MD5 f25f4d0d40561f5d8ce2a07845b19154
BLAKE2b-256 0fc370777e357ee96cafe3bf02dbfe4e32e2a3e85937f4648e0710b017fc4d87

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