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
File details
Details for the file ServeLight-3.4.4.tar.gz
.
File metadata
- Download URL: ServeLight-3.4.4.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60daa6e183d80f35146474dd630d4dc46897f1ba25138c94cf0b530410589ac5 |
|
MD5 | 5c31c169ce42ebf9fcb46da8bb0e612f |
|
BLAKE2b-256 | fd894769df929b2de7ee67a325033c7df94973b146f95b009814388254530f2a |
File details
Details for the file ServeLight-3.4.4-py3.7.egg
.
File metadata
- Download URL: ServeLight-3.4.4-py3.7.egg
- Upload date:
- Size: 47.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d94382bdd98ddc5b8553e6386b52713778857c73d10d4c564d329136ba58424 |
|
MD5 | 6a5c451695d54dddc75c0ffd48d261be |
|
BLAKE2b-256 | 6564f4e6a0e67df05e7984b35f04fb0473d5e628ddb69e2fb7ac72dba7ffe48b |
File details
Details for the file ServeLight-3.4.4-py3-none-any.whl
.
File metadata
- Download URL: ServeLight-3.4.4-py3-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 573db0f86506067c0b1d9855d14ec996e0dc6d6ef29ad8d9593388bade830938 |
|
MD5 | 7dcb2317fbbe4002c0823fb7d2e91c31 |
|
BLAKE2b-256 | 88de3020f2a7091fb66eaa1e15e47eb0e20d6d0d1f1d79b7f18da1b890ff07b4 |
File details
Details for the file ServeLight-3.4.4-py2.7.egg
.
File metadata
- Download URL: ServeLight-3.4.4-py2.7.egg
- Upload date:
- Size: 47.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fbe1e8c554bcf47753740c2550af5ec932dd59eb668027bd88319babb753434 |
|
MD5 | 79b8243a5206071e2233382a9e127b95 |
|
BLAKE2b-256 | d9e16ceda1226942629d42bfbfc1a7a22df7391d636e14454b75d30a25a75024 |
File details
Details for the file ServeLight-3.4.4-py2-none-any.whl
.
File metadata
- Download URL: ServeLight-3.4.4-py2-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab3f952ad7ca2786ea54d06ace2b822640f2b63fe681f52c18efcddb8a1761dc |
|
MD5 | f14f34a4351c9c13a31a43f48da6cc2a |
|
BLAKE2b-256 | 0549ca1edc6ef20145c0d8d21846ebf4707c584a244fc18adc476b6b2e81f6db |