Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
/ ServeLight Public archive

Lightweight and Responsive Server Framework

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt
Notifications You must be signed in to change notification settings

ksenginew/ServeLight

ServeLight

Downloads

This module defines classes for implementing HTTP/WSGI servers (Web servers).

Warning : This is not recommended for production. It only implements basic security checks.

One class, Server or WSGI Server creates and listens at the HTTP socket, dispatching the requests to a handler. Code to create and run the server looks like this:\

def run(server_class=Server, handler_class=BaseHandler):
    server_address = ('', 8000)
    httpd = server_class(server_address, handler_class)
    httpd.serve_forever()
run()
  • fast ( It's very fast )
  • simple ( modified version of simple wsgiref )
  • lightweight ( lightweight because simple )
  • WSGI ( supports web server gateway interface )
  • micro web-server ( can use as a traditional server )
  • with web frameworks (any WSGI framework supported)

Flask, Django, Pyramid, Bottle supported

Example: "Hello World"

def app(environ, start_response):
    ""A barebones WSGI application.
    This is a starting point for your own Web framework :)
    """
    status = '200 OK'
    response_headers = [('Content-Type', 'text/plain')]
    start_response(status, response_headers)
    return [b'Hello world from a simple WSGI application!\n']

save above code as app.py now run sl (ServeLight)

python -m sl --app=app:app

view examples for more...

View Documentaion*

Report [Issues(https://github.com/Ksengine/ServeLight/issues)*

License

Code and documentation are available according to the MIT License (see LICENSE).

About

Lightweight and Responsive Server Framework

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages