pyserv.server module

Simple HTTP server with broken GET rewriting for serving FW upgrades or other local files in an engineering development environment.

pyserv.server.main(args=None)[source]

The serv entry point wrapper; both args are optional, but you must provide either PORT or PORT and IFACE.

Usage:

serv [PORT] [IFACE]
pyserv.server.serv_init(iface, port, directory)[source]

Init http server for handoff; init logging and server/handler classes.

Parameters:
  • iface – initialized listen interface

  • port – initialized listen port

  • directory – server document root

Return httpd_handler:

threaded httpd handle, eg, httpd.start()

pyserv.server.serv_run(iface='', port=8080, directory='/home/runner/work/pyserv/pyserv/docs')[source]

Run in foreground command wrapper for console entry point; init logging and server, run the server, stop the server.

Parameters:
  • iface – server listen interface

  • port – server listen port

  • directory – server document root