Aeros.compression

The compression module includes classes for compression algorithms implemented by quart_compress. These are compatible with the async coroutine framework that Aeros uses and will compress the web server’s responses before sending it to the client.

Module Contents

Classes

Base

The base class that implements the wrapper for quart_compress.Compress.

Gzip

This class should be used to implement a Gzip compression to your Aeros web server.

Br

This class should be used to implement a Br compression to your Aeros web server.

Compression

The former class that represented compression for Aeros. Falls back to Gzip.

class Aeros.compression.Base(level: int = 2, min_size: int = 500, mimetypes: List = None)

The base class that implements the wrapper for quart_compress.Compress.

algorithm = gzip
init_app(self, app: quart.Quart)

Initializes the Compress instance with the give WebServer/Quart application instance

Parameters

app (Quart) – The web server instance to use the caching functionality with

class Aeros.compression.Gzip(level: int = 2, min_size: int = 500, mimetypes: List = None)

Bases: Aeros.compression.Base

This class should be used to implement a Gzip compression to your Aeros web server.

algorithm = gzip
class Aeros.compression.Br(level: int = 2, min_size: int = 500, mimetypes: List = None)

Bases: Aeros.compression.Base

This class should be used to implement a Br compression to your Aeros web server.

algorithm = br
class Aeros.compression.Compression[source]

The former class that represented compression for Aeros. Falls back to Gzip.

Warning

This class is deprecated and should not be used. Use Gzip or Br instead.