💫 This is a Python3 implementation of rejetto’s HTTP File Server~
🏗 Under construction…
🎉 Please help make this project grow. All contributions are welcome!
👏 Features that work:
special:strings
special:alias
🕳 Features that don’t work:
🍉 Supported platforms:
All x86, x64 platforms that Python 3.7 supports:
Some ARM platforms:
Maybe more!
👀 This project is not yet ready for production use. But you are welcomed to have a taste!
If you want to step forward, please do the following:
Install Werkzeug by either using pip
or placing the folder Werkzeug-(version)/src/werkzeug
from downloaded archive to cloned repo.
Install WSGIserver by either using pip
or placing the file WSGIserver-(version)/wsgiserver.py
from downloaded archive to cloned repo.
Pick a HFS template (for HFS 2.4), rename it to hfs.tpl
and place into cloned repo.
Configure port, base folder and upload-allowed folders in hfs.ini
.
For running a server, open run.py
; for developing, open test.py
.
Template choices:
/sdcard/qpython/projects3
, ensure folder is not nested.run.py
to main.py
.test.py
: Run a server for testing, debugging. It also contains werkzeug’s reload feature.
run.py
: Run a simple server. Has no debug feature, but works on pypy on aarch64 architecture.
hfs.ini
: Some configs, like port, are here. Currently you can set a base path as the root dir of served pages, also can set upload-allowed paths.
_test_macro.py
: Run & test a macro, by entering as argv1 in commandline.
cfgLib.py
: The Config
object is inside this file.
classesLib.py
: Some useful class
es are here.
helpersLib.py
: Some useful functions are here.
mimeLib.py
: Manages MIME types. Get a defined MIME type with something like mimeLib.getmime('*.html')
. You can define your own MIMEs in mime.ini
.
scriptLib.py
: When executing a macro/symbol, usually functions in this file will be called.
serverLib.py
: Defines a WSGI application, which acts like original HFS.
tplLib.py
: The template is interpreted by this.
Author: NaitLee
The Demo/Documentation: View The Demo/Documentation
Download Link: Download The Source Code
Official Website: https://github.com/NaitLee/PHFS
License: GPL-3.0
#python