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


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.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

datasette_gzip-0.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file datasette-gzip-0.1.tar.gz.

File metadata

  • Download URL: datasette-gzip-0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7c9408e98b2420058588eb62a5985b95f824300006db917be784bac11dc4252c
MD5 d8de049fccee2a5a91ef7912e49a83ef
BLAKE2b-256 42ed0b2e4ff4e90fd4a7bc029d91b53d552e60f18fb9ffe97cb88c72f3e9903d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for datasette_gzip-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5860c10150ec4b83558568068036218e1fe1226dc7bfb45cd5f80ef672545c24
MD5 08fc40d7739590fbc15db406655e6f11
BLAKE2b-256 44c23a9ef7a9c42339be0cbe8f99bbd27c27d14b8db9c3ac0c6c6360bb4816fa

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