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

Installation

pip install resumable-file-server

After installation, run it as resumable_file_server.

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.0a3.tar.gz (6.5 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.0a3-py2.py3-none-any.whl (7.1 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: resumable_file_server-0.1.0a3.tar.gz
  • Upload date:
  • Size: 6.5 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.0a3.tar.gz
Algorithm Hash digest
SHA256 321c93ce06bce4950fe9517aa47981a4d5af9f06215ac1d465ab625f4cdc6986
MD5 be81b9668c56dfb240368a4248e49949
BLAKE2b-256 b0e586a00fc3e66461e149686404922638245c90f4b3539678e30c72d2be1d34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for resumable_file_server-0.1.0a3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2f5b356bad8fcb553232299cfca4b1d599b5aeeda371e423f592b7de6bbc45cb
MD5 b6c4077b9a5111e8a481bb0772440283
BLAKE2b-256 78d94094d6136ffb6dfbce398a3a7027d7a180152ae8657ff25c212a2690ddd1

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