Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonw/datasette-granian
Run Datasette using the Granian HTTP server
https://github.com/simonw/datasette-granian
datasette datasette-plugin granian
Last synced: 27 days ago
JSON representation
Run Datasette using the Granian HTTP server
- Host: GitHub
- URL: https://github.com/simonw/datasette-granian
- Owner: simonw
- License: apache-2.0
- Created: 2023-01-16T20:04:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-23T20:58:06.000Z (10 months ago)
- Last Synced: 2024-10-07T13:59:53.487Z (about 1 month ago)
- Topics: datasette, datasette-plugin, granian
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# datasette-granian
[![PyPI](https://img.shields.io/pypi/v/datasette-granian.svg)](https://pypi.org/project/datasette-granian/)
[![Changelog](https://img.shields.io/github/v/release/simonw/datasette-granian?include_prereleases&label=changelog)](https://github.com/simonw/datasette-granian/releases)
[![Tests](https://github.com/simonw/datasette-granian/workflows/Test/badge.svg)](https://github.com/simonw/datasette-granian/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-granian/blob/main/LICENSE)Run Datasette using the Granian HTTP server
## Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-granian
## Usage
Run `datasette granian ...` instead of `datasette serve ...` - most options should remain the same.
```
% datasette granian fixtures.db content.db --crossdb
[INFO] Starting granian
[INFO] Listening at: 127.0.0.1:8001
[INFO] Booting worker-1 with pid: 92793
[INFO] Started worker-1
[INFO] Started worker-1 runtime-1
```## Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-granian
python3 -m venv venv
source venv/bin/activateNow install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest