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).
Metadata
Release files for ServeLight 3.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ServeLight-3.4.4.tar.gz | 20.7 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| ServeLight-3.4.4-py3.7.egg | Legacy Egg format | - | - | Details |
| ServeLight-3.4.4-py3-none-any.whl | Python 3 | none | any | Details |
| ServeLight-3.4.4-py2.7.egg | Legacy Egg format | - | - | Details |
| ServeLight-3.4.4-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 161.5 kB
Release files / ServeLight-3.4.4.tar.gz
| Download URL | ServeLight-3.4.4.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60daa6e183d80f35146474dd630d4dc46897f1ba25138c94cf0b530410589ac5
|
|
BLAKE2b-256 checksum How to use checksums |
fd894769df929b2de7ee67a325033c7df94973b146f95b009814388254530f2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / ServeLight-3.4.4-py3.7.egg
| Download URL | ServeLight-3.4.4-py3.7.egg |
|---|---|
| Size | 47.2 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
7d94382bdd98ddc5b8553e6386b52713778857c73d10d4c564d329136ba58424
|
|
BLAKE2b-256 checksum How to use checksums |
6564f4e6a0e67df05e7984b35f04fb0473d5e628ddb69e2fb7ac72dba7ffe48b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / ServeLight-3.4.4-py3-none-any.whl
| Download URL | ServeLight-3.4.4-py3-none-any.whl |
|---|---|
| Size | 23.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
573db0f86506067c0b1d9855d14ec996e0dc6d6ef29ad8d9593388bade830938
|
|
BLAKE2b-256 checksum How to use checksums |
88de3020f2a7091fb66eaa1e15e47eb0e20d6d0d1f1d79b7f18da1b890ff07b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / ServeLight-3.4.4-py2.7.egg
| Download URL | ServeLight-3.4.4-py2.7.egg |
|---|---|
| Size | 47.0 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
2fbe1e8c554bcf47753740c2550af5ec932dd59eb668027bd88319babb753434
|
|
BLAKE2b-256 checksum How to use checksums |
d9e16ceda1226942629d42bfbfc1a7a22df7391d636e14454b75d30a25a75024
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / ServeLight-3.4.4-py2-none-any.whl
| Download URL | ServeLight-3.4.4-py2-none-any.whl |
|---|---|
| Size | 23.3 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
ab3f952ad7ca2786ea54d06ace2b822640f2b63fe681f52c18efcddb8a1761dc
|
|
BLAKE2b-256 checksum How to use checksums |
0549ca1edc6ef20145c0d8d21846ebf4707c584a244fc18adc476b6b2e81f6db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|