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 GzipMiddleware provided by Starlette.
If you are already running Datasette behind a proxy such as Nginx or Cloudflare that applies its own compression you will not benefit from installing this plugin.
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
Hashes for datasette_gzip-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5860c10150ec4b83558568068036218e1fe1226dc7bfb45cd5f80ef672545c24 |
|
MD5 | 08fc40d7739590fbc15db406655e6f11 |
|
BLAKE2b-256 | 44c23a9ef7a9c42339be0cbe8f99bbd27c27d14b8db9c3ac0c6c6360bb4816fa |