Skip to main content

A simple, multithreaded HTTP file server supporting resumable downloads and file uploads written in pure Python. Drop-in replacement for `SimpleHTTPServer`, `http.server`.

Project description

Resumable File Server

A simple, multithreaded HTTP file server supporting resumable downloads and file uploads written in pure Python. Drop-in replacement for SimpleHTTPServer, http.server.

Features

  • Supports Python 2 and Python 3
  • Proper handling of Unicode
  • Support for HTTP Range requests (partial downloads)
  • Multithreaded serving (handles many clients)
  • Directory browsing and multi-file upload via UTF-8 HTML interface
  • Specify root directory to serve files from
  • Configurable host/IP and port

Usage

Serve files inside /home/user on localhost:8080:

resumable_file_server 8080 --host localhost --port  --root /home/user/

Then download with curl:

curl -O -C - http://localhost:8080/largefile.zip

You can also upload one or more files (this uploads them to /home/user/images/):

curl -X POST \
  -F "file=@/path/to/photo.jpg" \
  -F "file=@/path/to/document.pdf" \
  http://localhost:8080/images/

And you will see an UTF-8 HTML with a multi-file picker and upload button at the bottom if you open http://localhost:8080/ with your browser.

Arguments

Argument Description Default
port Port to listen on 8000
--host Host/IP address to bind to localhost
--root, -r Root directory to serve files from . (current directory)

Security Notes

  • Requests outside the root directory (e.g., ../../etc/passwd) are blocked automatically.
  • Only files inside the --root are accessible.

License

MIT License

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

resumable_file_server-0.1.0a5.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

resumable_file_server-0.1.0a5-py2.py3-none-any.whl (7.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file resumable_file_server-0.1.0a5.tar.gz.

File metadata

  • Download URL: resumable_file_server-0.1.0a5.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for resumable_file_server-0.1.0a5.tar.gz
Algorithm Hash digest
SHA256 5ad34e75695afa5fb5d7a0f0a1064ebf9dc4c3f6cdcba84c58acf784cd5ab2f9
MD5 26a295c7b476971d6693ebfb26262729
BLAKE2b-256 a6c6874f0adf12419796947a35583b11273b548df2c4dfd178804b86401ed0e2

See more details on using hashes here.

File details

Details for the file resumable_file_server-0.1.0a5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for resumable_file_server-0.1.0a5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4c9f37d58368cb848715e6396818680552a30fb06a959ef68eea1fdcc58ef4f1
MD5 2f643932a59d9cabbd978b0a024e4a1e
BLAKE2b-256 f241a177f315f15f551825537d17d10d99da46ba45da1667265214ebb097e643

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