Skip to main content

Python webserver with https and upload support

Project description


Defweb is an enhancement of the standard http.server of python3. Defweb supports https and file uploads.


Installing the package via pypi:

pip install defweb
usage: [-h] [-b BIND] [-d [DIR]] [-i [SERVER NAME]] [-p PORT]
                   [--proxy] [--key [KEY]] [--cert [CERT]] [-r] [-s]
                   [-u [USER:PASSWORD]] [-v]

optional arguments:
  -h, --help            show this help message and exit
  -b BIND               ip to bind to; defaults to
  -d [ DIR ]            path to use as document root
  -i [ SERVER NAME ]    server name to send in headers
  -p PORT               port to use; defaults to 8000
  --proxy               start proxy for SOCKS4, SOCKS5 & HTTP
  --key [ KEY ]         key file to use for webserver
  --cert [ CERT ]       certificate file to use for webserver
  -r, --recreate_cert   re-create the ssl certificate
  -s, --secure          use https instead of http
  -u [ USER:PASSWORD ]  user credentials to use when authenticating to the
                        proxy server
  -v, --version         show version and then exit
python3 -m defweb

Defweb facilitates uploading files to the document root via the PUT command.

Example for 'curl' and wget (the -k switch (curl) and
--no-check-certificate (wget) is needed because Defweb uses self signed certificates by default).

curl -X PUT --upload-file file.txt https://localhost:8000 -k
wget -O- --method=PUT --body-file=file.txt https://localhost:8000/somefile.txt --no-check-certificate 

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for defweb, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size defweb-0.2.1-py3-none-any.whl (25.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size defweb-0.2.1.tar.gz (11.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page