Skip to main content

sanic-gzip

A Sanic plugin to manage compression as a decorator

Installation

Install with pip:

pip install sanic-gzip

Usage

Usage is as simple as a decorator before your function

from sanic import Sanic
from sanic_gzip import compress

app = Sanic(__name__)
compress = Compress()

@app.get("/logs")
@compress.compress()
async def my_verbose_function(request):

The current version supports both gzip and deflate algorithms.

Options

Config options are to be setted as init argument:

  • Compression min. size
  • Compression level
  • MIME types impacted
  • Number of threadused for compression

Metadata

Release files for sanic-gzip 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sanic-gzip 0.4.1
File Size Uploaded Provenance Actions
sanic_gzip-0.4.1.tar.gz 4.2 kB Without provenance Details for sanic_gzip-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sanic-gzip 0.4.1
File Interpreter ABI Platform Actions
sanic_gzip-0.4.1-py3-none-any.whl Python 3 none any Details for sanic_gzip-0.4.1-py3-none-any.whl

Total release size: 9.0 kB

Release files / sanic_gzip-0.4.1.tar.gz

Download URL sanic_gzip-0.4.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
637998e8b2adb82052122bb28db4ecf4c0e7c3d9aaef8cf04ee81a60287e4a4c
BLAKE2b-256 checksum
How to use checksums
44b71f80e8e0eedbb01fa07649a464e73c76181235719d8792c36c4d37151782
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

Release files / sanic_gzip-0.4.1-py3-none-any.whl

Download URL sanic_gzip-0.4.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
899b3f3342d8331894aefccfa54677cb54a39cf384faf7228354c80dee634a60
BLAKE2b-256 checksum
How to use checksums
6bc3659cf5b5f58b23a7ffef913a5e77cca16d6c739d5d4455b369e13c432d38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

Security for sanic-gzip 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page