Skip to main content

srve

A tiny command-line HTTP server built on Python's standard library. It can srve a directory or expose a single file.

Usage

Srve the current directory on port 8000:

uvx srve

Use a different port:

uvx srve 8080

Srve a single file:

uvx srve ./document.pdf

Srve a single file on a different port:

uvx srve ./document.pdf 8080

Bind to a specific address or srve another directory:

uvx srve --bind 127.0.0.1 --directory ./public 8080

Expose the served file or directory with a temporary Cloudflare Quick Tunnel:

uvx srve -t
uvx srve -t ./document.pdf

This prints a public trycloudflare.com URL. If cloudflared is missing, srve prompts to install it with Homebrew on macOS or winget on Windows. No Cloudflare account is required.

Run a local checkout:

uvx --from ~/serve srve

License

MIT

Metadata

Release files for srve 0.3.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 srve 0.3.0
File Size Uploaded
srve-0.3.0.tar.gz 2.6 kB Details

Built distribution (wheel)

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

Total release size: 6.1 kB

Release files / srve-0.3.0.tar.gz

Download URL srve-0.3.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
11ab21facd5d8573951a11768bed4f0b01445c42851d0b8440e1c0c828f407db
BLAKE2b-256 checksum
How to use checksums
6c2f591119a7c0e56d545145a7a5946f5fcac1153b6625ef51fabf54b9bd167e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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":null}

Release files / srve-0.3.0-py3-none-any.whl

Download URL srve-0.3.0-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41be290f24c139d755a7df2a739ef0c9073d9fa8268f50ee6ac85ff0cde24537
BLAKE2b-256 checksum
How to use checksums
3138da679bdb13d412e8172c5beb8a600f475a3c08d5c4b2d74592e1905be8d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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":null}

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.2.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