A socket-based light server framework
Project description
Lightning
A socket-based lightly python server framework
Choose your language: English(current) 简体中文
Install
Install and update with pip:
$ pip install -U lightning-server
Create an Example
# save this as example.py
import lightning
server = lightning.Server()
@server.bind('/')
def hello(request):
return f'Hello World!\nThe request is received from {request.addr}'
server.run()
$ python example.py
Server running on ('0.0.0.0', 80). Press Ctrl+C to quit.
Advantage
- Fewer dependencies, only depends on built-in modules
- High extensibility, you can control the server from http-layer to socket-layer by inheriting classes
- Easily developing, just drop your functions into Interface class to implement features
About Author
I am a middle student from China. If I am at school, the developing progress may be very slow. Sorry :(
You can subscribe me on bilibili. Welcome!
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
lightning-server-0.7.2.tar.gz
(18.0 kB
view hashes)
Built Distribution
Close
Hashes for lightning_server-0.7.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f40d42a5ac3b6a7a55eb3d4694cfeb38f34d4418e849d70271e1cdc1a37c26c |
|
MD5 | 669c2b2d129e79702f8615013493d845 |
|
BLAKE2b-256 | 5bdd4d7ba88a5b5fc85c82531202a2011f7425d733876f26e6477196bf7fbf44 |