Simple HTTP Server
一个支持文件上传下载和临时文本保存的 HTTP 服务器。
安装:pip3 install httpserver4u
运行:python3 -m httpserver4u
不需安装运行:python src/httpserver4u/server.py 代码(单脚本即可执行)
无三方库依赖。适用于 Python 3.6 及以上版本。
基于 UniIsland 的 Gist 和 Tallguy297/SimpleHTTPServerWithUpload 的代码,稍作修改:
- 移除了图标
- 解决了 Ctrl-C 退出后立刻重启,提示
port already in use的问题 - 增加文本保存功能
- 完全 UTF-8 化(除二进制文件下载/上传外)
- 适用:临时、局域网内、小文件
- 不适用:长时间运行、大文件量、高并发、面向外部网络开放、需要安全性保证
A simple HTTP server with file upload/download and quick text save function.
Install:pip3 install httpserver4u
Run:python3 -m httpserver4u
Run without install:python src/httpserver4u/server.pysource code (This script contains all functionality.)
No third-party dependency. Python 3.6 or newer version required.
Based on code of UniIsland's Gist and Tallguy297/SimpleHTTPServerWithUpload, with slight modification for my own use case:
- Removes the icons
- Fix the bug that if the script is stopped using Ctrl-C and immediately restarted, it will fail with
port already in use - Add the ability to quickly save text to a text file
- Enable UTF-8 encoding everywhere (beside actual binary file download / upload)
- For: temporary, local lan network, small files
- Not for: long term, large file, high concurrency, exposed to external network, security needed
Metadata
Release files for httpserver4u 0.0.2
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 |
|---|---|---|---|---|
| httpserver4u-0.0.2.tar.gz | 10.1 kB | Without provenance | Details for httpserver4u-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| httpserver4u-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for httpserver4u-0.0.2-py3-none-any.whl |
Total release size: 19.5 kB
Release files / httpserver4u-0.0.2.tar.gz
| Download URL | httpserver4u-0.0.2.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78ebc35209de6714b91506565d266826fea23b5b0a9ebeb96eff07cd986cc7de
|
|
BLAKE2b-256 checksum How to use checksums |
6279e499571503e0f83505f582c0414f2525225353a6074f1a87e1ebf79d2de6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / httpserver4u-0.0.2-py3-none-any.whl
| Download URL | httpserver4u-0.0.2-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9d76545a1045e65ef3ddcc3a598cc5941fe7b3b29e0ca4cc94196f25fafe1df
|
|
BLAKE2b-256 checksum How to use checksums |
13af1a306618a2fccfec151687254cc7a784302b96da62b7d99845131bed3bc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for httpserver4u 0.0.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.