2025-03-04 23:15:55 +01:00
2025-05-03 23:47:30 +02:00
2025-03-04 23:15:55 +01:00
2025-05-03 23:49:38 +02:00
2025-05-04 14:54:51 +02:00

PyWebServer

GitHub

The upstream of this project is on my own Gitea instance.
Because of that I'll mostly reply to issues and PRs there, you can submit issues and PRs on GitHub, but it might take longer before I read it.

Installing

Installing and running PyWebServer is very simple.
Assuming you're running Linux:

git clone https://git.novacow.ch/Nova/PyWebServer.git
cd ./PyWebServer/

Windows users, make sure you have installed Git, from there:

git clone https://git.novacow.ch/Nova/PyWebServer.git
Set-Location .\PyWebServer\

From here, you should check from what directory you want to store the content in.
In this example, we'll use ./html/ (or .\html\ for Windows users) from the perspective of the PyWebServer root dir.
To create this directory, do this:

mkdir ./html/

(This applies to both Windows and Linux)
Then, open pywebsrv.conf in your favorite text editor and change the directory key to the full path to the ./html/ you just created.
After that, put your files in and run this: Linux:

python3 /path/to/pywebsrv.py

Windows:

# If you have installed Python via the Microsoft Store:
python3 \path\to\pywebsrv.py
# Via the python.org website:
py \path\to\pywebsrv.py

SSL Support

Currently PyWebServer warns about AutoCertGen not being installed. AutoCertGen currently is very unstable at the moment, and therefore is not available for download.
PyWebServer supports SSL/TLS for authentication via HTTPS. In the config file, you should enable the HTTPS port. After that you need to create the certificate.
Currently PyWebServer looks for the cert.pem and the key.pem files in the root directory of the installation.
PyWebServer comes with a test certificate, this certificate is self-signed, but doesn't have a matching issuer and subject. This is to prevent people from using it in production, even if they have disabled warnings of self-signed certificates.

HTTP support

Currently PyWebServer only supports HTTP/1.1, this is very unlikely to change, as most of the modern web today still uses HTTP/1.1.
For methods PyWebServer only supports GET, this is being reworked though, check issue #3 for progress.

Files support

Unlike other small web servers, PyWebServer has full support for binary files being sent and received (once that logic is put in) over HTTP.

Support

PyWebServer will follow a standard support scheme.

1.x

For every 1.x version there will be support until 2 newer versions come out. So that means that 1.0 will still be supported when 1.1 comes out, but no longer be supported when 1.2 comes out.

2.x

I am planning on releasing a 2.x version with will have a lot more advanced features, like nginx's server block emulation amongst other things. When 2.0 will come out, the last version of 1.x will be supported for a while longer, but no new features will be added.

Description
No description provided
Readme GPL-3.0 144 KiB
v1.3.0 Latest
2025-07-22 16:37:18 +02:00
Languages
Python 97.8%
HTML 2.2%