Skip to main content

Add gzip compression to Datasette

Project description

datasette-gzip

PyPI Changelog Tests License

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


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)

Uploaded source

Built Distribution

datasette_gzip-0.2-py3-none-any.whl (6.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page