Name | django-plugin-datasette JSON |
Version |
0.2
JSON |
| download |
home_page | None |
Summary | Django plugin to run Datasette inside of Django |
upload_time | 2024-09-26 16:39:26 |
maintainer | None |
docs_url | None |
author | Simon Willison |
requires_python | None |
license | Apache-2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# django-plugin-datasette
[![PyPI](https://img.shields.io/pypi/v/django-plugin-datasette.svg)](https://pypi.org/project/django-plugin-datasette/)
[![Changelog](https://img.shields.io/github/v/release/simonw/django-plugin-datasette?include_prereleases&label=changelog)](https://github.com/simonw/django-plugin-datasette/releases)
[![Tests](https://github.com/simonw/django-plugin-datasette/workflows/Test/badge.svg)](https://github.com/simonw/django-plugin-datasette/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/django-plugin-datasette/blob/main/LICENSE)
Run [Datasette](https://datasette.io/) inside Django as a [DJP](https://djp.readthedocs.io/) plugin
## Installation
First configure your Django project [to use DJP](https://djp.readthedocs.io/en/latest/installing_plugins.html). Be sure to configure your `asgi.py` file.
Then install this plugin in the same environment as your Django application.
```bash
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](https://www.uvicorn.org/):
```bash
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:
```bash
cd django-plugin-datasette
python -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```bash
pip install -e '.[test]'
```
To run the tests:
```bash
python -m pytest
```
Raw data
{
"_id": null,
"home_page": null,
"name": "django-plugin-datasette",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Simon Willison",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/c6/e5/ded9b4217522816093d86d2d0224b76352e8020278acf97c93dfe5eecf90/django_plugin_datasette-0.2.tar.gz",
"platform": null,
"description": "# django-plugin-datasette\n\n[![PyPI](https://img.shields.io/pypi/v/django-plugin-datasette.svg)](https://pypi.org/project/django-plugin-datasette/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/django-plugin-datasette?include_prereleases&label=changelog)](https://github.com/simonw/django-plugin-datasette/releases)\n[![Tests](https://github.com/simonw/django-plugin-datasette/workflows/Test/badge.svg)](https://github.com/simonw/django-plugin-datasette/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/django-plugin-datasette/blob/main/LICENSE)\n\nRun [Datasette](https://datasette.io/) inside Django as a [DJP](https://djp.readthedocs.io/) plugin\n\n## Installation\n\nFirst configure your Django project [to use DJP](https://djp.readthedocs.io/en/latest/installing_plugins.html). Be sure to configure your `asgi.py` file.\n\nThen install this plugin in the same environment as your Django application.\n```bash\npip install django-plugin-datasette\n```\n## Usage\n\nOnce installed, `/-/datasette/` will serve a Datasette instance that exposes the contents of any SQLite databases used by Django.\n\nYou will need to run Django using ASGI. One way to do that is with [Uvicorn](https://www.uvicorn.org/):\n\n```bash\npip install uvicorn\nuvicorn myproject.asgi:application\n```\n\n**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.\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd django-plugin-datasette\npython -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```bash\npip install -e '.[test]'\n```\nTo run the tests:\n```bash\npython -m pytest\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Django plugin to run Datasette inside of Django",
"version": "0.2",
"project_urls": {
"CI": "https://github.com/simonw/django-plugin-datasette/actions",
"Changelog": "https://github.com/simonw/django-plugin-datasette/releases",
"Homepage": "https://github.com/simonw/django-plugin-datasette",
"Issues": "https://github.com/simonw/django-plugin-datasette/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0fc370777e357ee96cafe3bf02dbfe4e32e2a3e85937f4648e0710b017fc4d87",
"md5": "f25f4d0d40561f5d8ce2a07845b19154",
"sha256": "8e747be9381372a5fcaa9b5cfa0b7600d8b0bf61b302a4e0f010aca8ddad7e3b"
},
"downloads": -1,
"filename": "django_plugin_datasette-0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f25f4d0d40561f5d8ce2a07845b19154",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7451,
"upload_time": "2024-09-26T16:39:25",
"upload_time_iso_8601": "2024-09-26T16:39:25.769538Z",
"url": "https://files.pythonhosted.org/packages/0f/c3/70777e357ee96cafe3bf02dbfe4e32e2a3e85937f4648e0710b017fc4d87/django_plugin_datasette-0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c6e5ded9b4217522816093d86d2d0224b76352e8020278acf97c93dfe5eecf90",
"md5": "542a44866a79cd8d98f8d6132ec338ed",
"sha256": "b31d6a568408fa32c3dfdb044ade956061ca3afa05212de60aac105992d2cfb1"
},
"downloads": -1,
"filename": "django_plugin_datasette-0.2.tar.gz",
"has_sig": false,
"md5_digest": "542a44866a79cd8d98f8d6132ec338ed",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7505,
"upload_time": "2024-09-26T16:39:26",
"upload_time_iso_8601": "2024-09-26T16:39:26.619409Z",
"url": "https://files.pythonhosted.org/packages/c6/e5/ded9b4217522816093d86d2d0224b76352e8020278acf97c93dfe5eecf90/django_plugin_datasette-0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-26 16:39:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "simonw",
"github_project": "django-plugin-datasette",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-plugin-datasette"
}