Skip to main content

An extended version of Python's SimpleHTTPServer that supports https, authentication, rate limiting, and download resuming.

Project description

ext_http_server

An extended version of Python's http.server that turns a simple static file server into one supporting HTTPS, HTTP Basic authentication, server-to-client rate limiting, and resumable downloads via HTTP Range requests.

Requirements

ext_http_server supports Python 3.10 through 3.14.

Installation

Install the ext_http_server command with uv:

uv tool install ext_http_server

Generate a certificate

Generate a self-signed certificate, writing the private key and certificate together into cert.pem (the single file --cert expects). This uses a modern ECDSA P-256 key, which every common TLS client supports (Ed25519 keys are newer but are rejected by some clients, including the LibreSSL-based curl that ships with macOS as of June 2026):

openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -noenc -keyout cert.pem -out cert.pem -days 365 -subj "/CN=localhost"

Running ext_http_server

If you have files you want to serve in /tmp/path/to/files/ run the following to serve them up with a max outgoing throughput of 16KBps:

ext_http_server --cert cert.pem -d /tmp/path/to/files -r16 -a foo:bar

Or run it once without installing:

uvx ext_http_server --cert cert.pem -d /tmp/path/to/files -r16 -a foo:bar

By default, you will be able to access the webserver at https://localhost:8000. To authenticate, use the username foo and the password bar as indicated by the -a foo:bar argument. Note that multiple -a arguments can be added to add more than one user.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ext_http_server-1.0.0.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ext_http_server-1.0.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file ext_http_server-1.0.0.tar.gz.

File metadata

  • Download URL: ext_http_server-1.0.0.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ext_http_server-1.0.0.tar.gz
Algorithm Hash digest
SHA256 25fb1abd24e8cc5e2d826ea907cc6e4e87aaf981ca8efd22f807cee1b522b4ac
MD5 d6c1d54f034d3456698523a0a7c8d963
BLAKE2b-256 781adf1de4c2cf49cbc5f77a0c233785f61f923a1451ad70539b5bf96154cdde

See more details on using hashes here.

File details

Details for the file ext_http_server-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ext_http_server-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ext_http_server-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ec4da97e47914c206e0d5dac711341d6a5776a01e700cfe8b898922dc609ecf
MD5 252e39a76ca0c9b2c891748ddf663373
BLAKE2b-256 76ce6a265d227a9b9efb5b344d5a124f1f4ff92a5960048f9f89f8489d4de64f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page