Python server. Redesigned.
reserve is a generic Python server (and server library). It means it’s able to host any type of application, not only wsgi apps like the web servers do.
sdlaunch -b "[::]:80" -- reserve app [args...]
Application is a python module containing a launch(args) callable - where args is an array of strings.
It should return a request handler callable - handle(socket, client_address, server), where:
reserve currently bundles only one reserve app - http. Together with wsgi subapplication it can be used to serve WSGI apps.
The API for writing subapplications of http is currently undocumented and considered a implementation detail. You should not use it, as it might change at any point in the future. Still, you may use it together with wsgi - as that is guaranteed to remain backwards compatible.
sdlaunch -b "[::]:80" -- reserve app http wsgi wsgi-app-name [args...]
where wsgi-app-name is a python module containing a launch(args) callable (like with normal reserve app)
It should return a WSGI (PEP 3333) application callable.
Warning: You should not use reserve.http in production. You should serve your application as SCGI/FCGI/… instead and use a real web server as a frontend.
reserve does not currently support SCGI/FCGI/…, but in the near future it will.