Lightweight and Responsive Server Framework
Project description
ServeLight
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 ( around 150 lines )
- lightweight (simple and lightweight )
- 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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for ServeLight-3.4.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd5ae6f86a1eb42a092102c4d158dc5b6e555e53c32380cfa6b5cc772f46bf0d |
|
MD5 | 3eaa0e3083be88d4a12b4bff09fe8e97 |
|
BLAKE2b-256 | 743f87afc27a39829fc61ca7ee16213f5264d5a9428944bba606abd899114e2b |
Hashes for ServeLight-3.4.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d16d81da1f51822702b35a54f9d5d6c8e588648b42ae67e98a3a288676b0bf73 |
|
MD5 | b5f0d96255d463bcd09ae7af9079e918 |
|
BLAKE2b-256 | 3b6dcd4773adeb0744babe9494f78574816513a85bb90f42c9530c24b114e28b |
Hashes for ServeLight-3.4.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c0fdb8aec407ab8fa6a85ace3f8c0449d465704dac8f413b17e86c2904a6fd |
|
MD5 | 169a7fd69f5a9cf02cbbf9aeb4286ea5 |
|
BLAKE2b-256 | 2136dfba0a284c64b48cfa52f3dd46618aa3aa685f5c29e5bc2e06baf5c9d337 |