A FastAPI web file uploader
Project description
Web File Uploader
一個使用 FastAPI 建構的簡單網頁檔案上傳器。
安裝 uv
如果尚未安裝 uv,請先安裝:
# 使用 pip 安裝 uv
pip install uv
# 或使用官方安裝腳本
curl -LsSf https://astral.sh/uv/install.sh | sh
開發和除錯
使用虛擬環境開發
-
安裝依賴到現有的虛擬環境:
cd web-file-uploader & ..\venv\Scripts\Activate.ps1 uv pip install -e .
-
啟動開發伺服器(支援自動重新載入):
uvicorn main:app --reload --host 0.0.0.0 --port 8000
使用 uvx 部署
在專案目錄中執行:
uvx --from . web-file-uploader
這將安裝依賴並啟動 FastAPI 伺服器在 http://localhost:8000
API 端點
GET /: 歡迎訊息和 API 文檔鏈接POST /upload: 上傳檔案(支援 txt, pdf, jpg, jpeg, png, gif, zip)GET /files: 列出已上傳的檔案DELETE /files/{filename}: 刪除指定檔案
API 文檔
啟動伺服器後,訪問 http://localhost:8000/docs 查看完整的互動式 API 文檔。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file web_file_uploader-0.1.0.tar.gz.
File metadata
- Download URL: web_file_uploader-0.1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aef28014c12d35566a67bed9d318f8dee4d203124a612be0e3365e621d0565ce
|
|
| MD5 |
c59b218fcd0049ab60d072a3318e7fc2
|
|
| BLAKE2b-256 |
2ec463d89b5689fbe7be63a373334dd93632d2aae619a2e7d39158422914e2ae
|
File details
Details for the file web_file_uploader-0.1.0-py3-none-any.whl.
File metadata
- Download URL: web_file_uploader-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5756b21fc38afa10b1b3d25de208573e01984d9d0b2af62f30e5913d02fc9e7
|
|
| MD5 |
8b99bf9d5709cb4f4b0723b98a38337d
|
|
| BLAKE2b-256 |
6b4029bfd5cfeab1cc46b11f051ed9bbfd77182d9de30f435a216130149e3942
|