A socket-based lightly 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
from lightning import Server
server = 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.0.4.4.1.tar.gz
(14.2 kB
view hashes)
Built Distribution
Close
Hashes for lightning-server-0.0.4.4.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc46ff0fae8171a40949c76e4c66118236adefb793c77dd8cec15897d9f7afc9 |
|
MD5 | 9e3ba60dbd6cfbd8e494d44de105ace4 |
|
BLAKE2b-256 | 8035cfa38e6588ef58383b4d51d6d113622e6911c289fab9e64168ef174106a1 |
Close
Hashes for lightning_server-0.0.4.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2460f28f982d0a8a10d02e33e99aa6bd47ae1a62cd581e8028da597bd59fc7c8 |
|
MD5 | d651fa8d56cd5dc3fab6536aa94d85e0 |
|
BLAKE2b-256 | 22e3e0b3e5e0fdcdf83b9bee1d89da3780184057fea36261cbe8f0faf33eafd9 |