Skip to main content

AIOHTTP ZIP Response

Versions PyPI Codecov License

A AIOHTTP response class streaming the contents of a directory as a ZIP archive. Thanks to stream-zip, this works without storing the entire ZIP in memory or disk.

Generally, this package is meant to complement the existing aiohttp.web.FileResponse class which can be used to stream the contents of a single file.

Installation

pip install aiohttp-zip-response

Usage

from aiohttp import web
from aiohttp_zip_response import ZipResponse


async def handle_zip(request):
    return ZipResponse('path/to/directory')


app = web.Application()
app.router.add_get('/zip', handle_zip)
web.run_app(app)

Caveats

  • The Content-Length header is not set because the size of the ZIP archive is not known in advance. This means clients such as browsers cannot display a download progress bar.
  • This package currently doesn't support streaming of symbolic links to directories.

Release files for aiohttp-zip-response 2.4.0

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

Source distribution (sdist)

Source distribution for aiohttp-zip-response 2.4.0
File Size Uploaded
aiohttp_zip_response-2.4.0.tar.gz 118.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiohttp-zip-response 2.4.0
File Interpreter ABI Platform
aiohttp_zip_response-2.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 122.9 kB

Release files / aiohttp_zip_response-2.4.0.tar.gz

Download URL aiohttp_zip_response-2.4.0.tar.gz
Size 118.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f7bb95ce82407e778aacf7e88ac7fef98df37ccec73a90a2305f8973f019c6a4
BLAKE2b-256 checksum
How to use checksums
812ebb507bb022868f2d452692eaa1d76bb265a231b34842c772cc51650d49ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.3

Release files / aiohttp_zip_response-2.4.0-py3-none-any.whl

Download URL aiohttp_zip_response-2.4.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6345c806741af922aff989da0b4b00be5c64af638f8831e0b2857fdeeb85dda
BLAKE2b-256 checksum
How to use checksums
76aaca0c896ae2f05d1dbaf7d1e399981fff90291ec8e3e6394f763390a904be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.3

Release history Release notifications | RSS feed

This release

2.4.0 This release

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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