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
Built Distribution
File details
Details for the file datasette-gzip-0.2.tar.gz
.
File metadata
- Download URL: datasette-gzip-0.2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ae8714e9fbc4d71b0a64d7833c13c641d9a98a615d57eaf4ad2abcb1658f0fd |
|
MD5 | bd50b3996510c2a1b81f0e00b0dc3c95 |
|
BLAKE2b-256 | 3e9806b717cb8f0cca9ec083ec57eedb5e1a3c6c1b561af44f75dbdaddf97213 |
File details
Details for the file datasette_gzip-0.2-py3-none-any.whl
.
File metadata
- Download URL: datasette_gzip-0.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d24d252234f5652a9e8f65a48090c816ab9a8af7ddc512a5d9363c55fbf5cd64 |
|
MD5 | 7d036f7e6fc7de33f86b974d7c7ca8c4 |
|
BLAKE2b-256 | 90162500bdd45a86e25abc10c7e388fa34925dc98718ab64916356c26a1c9a74 |