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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for datasette-gzip-0.2.tar.gz
Algorithm Hash digest
SHA256 6ae8714e9fbc4d71b0a64d7833c13c641d9a98a615d57eaf4ad2abcb1658f0fd
MD5 bd50b3996510c2a1b81f0e00b0dc3c95
BLAKE2b-256 3e9806b717cb8f0cca9ec083ec57eedb5e1a3c6c1b561af44f75dbdaddf97213

See more details on using hashes here.

File details

Details for the file datasette_gzip-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_gzip-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d24d252234f5652a9e8f65a48090c816ab9a8af7ddc512a5d9363c55fbf5cd64
MD5 7d036f7e6fc7de33f86b974d7c7ca8c4
BLAKE2b-256 90162500bdd45a86e25abc10c7e388fa34925dc98718ab64916356c26a1c9a74

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page