Add gzip compression to Datasette
Project description
datasette-gzip
Add gzip compression to Datasette
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-gzip
Usage
Once installed, Datasette will obey the Accept-Encoding:
header sent by browsers or other user agents and return content compressed in the most appropriate way.
This plugin is a thin wrapper for the asgi-gzip library, which extracts the GzipMiddleware from Starlette.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-gzip
python3 -mvenv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
datasette-gzip-0.2.tar.gz
(6.2 kB
view hashes)
Built Distribution
Close
Hashes for datasette_gzip-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d24d252234f5652a9e8f65a48090c816ab9a8af7ddc512a5d9363c55fbf5cd64 |
|
MD5 | 7d036f7e6fc7de33f86b974d7c7ca8c4 |
|
BLAKE2b-256 | 90162500bdd45a86e25abc10c7e388fa34925dc98718ab64916356c26a1c9a74 |