quickhttp
quickhttp is a lightweight CLI that wraps Python's http.server with automatic port-finding and automatic shutdown after a configurable idle duration.
Features
- Automatically finds and uses an available port, preferring the 8000–8999 range.
- Has a keep-alive time after which it will shut down automatically if no requests are received, in case you forget about it.
- More secure default of
127.0.0.1, which is only accessible from this computer, instead of0.0.0.0. - Supports IPv6, including
::to serve on all interfaces over both IPv4 and IPv6. - Easier to type and autocomplete than
python -m http.server.
Installation
If you're using uv, you can immediately run it without installing by using uvx:
uvx quickhttp
To install it to be available for later use, you can use any method that installs from PyPI. I recommend using uv tool or pipx to manage Python command-line programs.
uvx quickhttp
# or
uv tool install quickhttp
# or
pipx install quickhttp
# or
pip install quickhttp
Development Version
To run the development version of this program, get it directly from GitHub.
uvx "quickhttp @ git+https://github.com/jayqi/quickhttp.git"
Documentation
quickhttp --help
usage: quickhttp [-h] [-t DURATION] [-b ADDRESS] [-p PORT]
[--port-range-min PORT] [--port-range-max PORT] [--version]
[directory]
Lightweight CLI that wraps Python's `http.server` with automatic port-finding
and shutdown.
positional arguments:
directory Directory to serve. (default: .)
options:
-h, --help show this help message and exit
-t, --timeout DURATION
Time to keep server alive for after most recent
request. Accepts time expressions parsable by
pytimeparse, such as '10m' or '10:00'. (default: 10m)
-b, --bind ADDRESS Address to bind server to. '127.0.0.1' (IPv4) or '::1'
(IPv6) will only be accessible from this computer.
'0.0.0.0' (IPv4) or '::' (IPv4 and IPv6) is all
interfaces (IP addresses) on this computer, meaning
that it can be accessible by other computers at your
IP address. A hostname binds the first address it
resolves to. (default: 127.0.0.1)
-p, --port PORT Port to use. 0 uses a port chosen by the operating
system. If specified, ignores the port range options.
If not specified, searches the port range for an
available port, and uses a port chosen by the
operating system if none is available.
--port-range-min PORT
Minimum of range to search for an available port.
(default: 8000)
--port-range-max PORT
Maximum of range to search for an available port.
(default: 8999)
--version Show version and exit.
Why use quickhttp?
python -m http.serveris a pain to type.quickhttpis shorter and can autocomplete. (But you can still dopython -m quickhttptoo if you really want to.)- If you try starting
python -m http.serverand port 8000 is unavailable, you getOSError: [Errno 48] Address already in use. Then you have to choose another port and try again.quickhttpdeals with ports automatically for you. quickhttpwill automatically shutdown after the keep-alive time expires. This defaults to 10 minutes. I often start up an HTTP server to look at something, then open a new tab to continue doing things, and then I forget about the server.python -m http.serverdefaults to 0.0.0.0, which may make your server accessible to other people at your computer's IP address. This can be a security vulnerability, but isn't necessarily obvious to people who just want to quickly serve some static files.
Metadata
Release files for quickhttp 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quickhttp-3.0.0.tar.gz | 9.1 kB | With provenance | Details for quickhttp-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quickhttp-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for quickhttp-3.0.0-py3-none-any.whl |
Total release size: 19.6 kB
Release files / quickhttp-3.0.0.tar.gz
| Download URL | quickhttp-3.0.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffa2af6ecf13cf7d0783b36a6a6fd3ee1b22cf88c0ef7fb92abb3251b45ac777
|
|
BLAKE2b-256 checksum How to use checksums |
7d8f23f9251e13279d483aa9afbdff28cb0e10508d597c289a41f9db23d3828c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / quickhttp-3.0.0-py3-none-any.whl
| Download URL | quickhttp-3.0.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0fab41e205d9c328ca0f362af9c70da81b639480fb3727d72d8983dc278d8644
|
|
BLAKE2b-256 checksum How to use checksums |
d90c1a170eafecc9d460c7dc1ff92b2a605fa0b99baf8f7a36a1ce89120455af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for quickhttp 3.0.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for quickhttp-3.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA 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.