Skip to main content

ziphttpd: serve Zip files over HTTP

This runs a small web server that serves the contents of a Zip file. URLs mapping to directories within the Zip files are mapped to the index.html file if the directory contains it, otherwise it generates (very bare) listing of the directory.

Install

pip install ziphttpd

Example uses

ziphttpd archive.zip

Serves the contents of archive.zip over an automatically-selected ephemeral port, over the loopback interface (localhost).

ziphttpd -p 18888 archive.zip

Serves the file over the loopback interface, at port 18888.

ziphttpd -b 192.168.1.45 -p 18888 archive.zip

Serves the file over one's a network-exposed interface associated to one's IP address, port 18888.

python -m ziphttpd -B -b "" -p 18888 archive.zip

Serves over all of the host's network interfaces, port 18888, and skips starting a the host's web browser to http://0.0.0.0:18888/ (path / at the server's location). Notice how one can use python -m ziphttpd as an alternative to short-form entry point.

Command line arguments

Command line schema:

ziphttpd [options] ZIPFILE
Argument Description Example
ZIPFILE The file whose contents to distribute with this server. myfile.zip
-b ADDRESS
--address ADDRESS
Address to the IP interface to which the server should bind. localhost
10.2.1.18
0.0.0.0 (all interfaces bound)
-p PORT
--port PORT
Port to which to bind the server. 10080
80 (careful with privileged ports)
0 (autochoose an ephemeral port)
-B
--no-browser
By default, once the web server is set up, Ziphttpd opens a web browser tab to the server's URL on the host. This option omits this browser action.
-v
--verbose
Increases the verbosity level of the server log. Use twice for debugging trace.

In the wild...

Interactive standalone data maps generated using DataMapPlot

The DataMapPlot Python package, made by the Tutte Institute, enables the production of standalone interactive viewers for data embedded into vector spaces. These small web apps can be saved to Zip files for sharing. When downloaded to your own computer, use ziphttpd to view them. (The following example is slightly contrived, but it does demonstrate the composition satisfyingly.)

curl -L -o datamapplot_examples.zip https://github.com/lmcinnes/datamapplot_examples/archive/refs/heads/master.zip
ziphttpd datamapplot_examples.zip

Then browse through datamapplot_examples and arXiv to enjoy an interactive map of some 2.6 million papers made available on ArXiV between 1996 and January 2025.

Metadata

Release files for ziphttpd 1.1.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 ziphttpd 1.1.0
File Size Uploaded
ziphttpd-1.1.0.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ziphttpd 1.1.0
File Interpreter ABI Platform
ziphttpd-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / ziphttpd-1.1.0.tar.gz

Download URL ziphttpd-1.1.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c5f1c395f9ee977e4fed02448923fbe634a281c5cb58a802fe4a1207e8ae5ade
BLAKE2b-256 checksum
How to use checksums
0c5e0c7c93f5f9e941d01d5f9970915ac44f26a4e6eeff4c7e3f723a05867601
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.7

Release files / ziphttpd-1.1.0-py3-none-any.whl

Download URL ziphttpd-1.1.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bc08aa45022f2e838864aeee66e669ff71d377b41bcb849565a850a3f7dda3b
BLAKE2b-256 checksum
How to use checksums
23e6b30525a8d70821ac94dc51a6b5b023cb38fc8f757b1eacf3d28bff5cb14f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.7

Release history Release notifications | RSS feed

This release

1.1.0 This release

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