Skip to main content

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


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.4.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lightning_server-0.7.4-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file lightning-server-0.7.4.tar.gz.

File metadata

  • Download URL: lightning-server-0.7.4.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for lightning-server-0.7.4.tar.gz
Algorithm Hash digest
SHA256 12b8b40ec7be4a9573f27ab24a9f84c34f50b13424022a830270ff0f07241d6a
MD5 975858f5fb40cdbf8a60280a967fa6cb
BLAKE2b-256 0cb737eebd8df8da90d25a0e9ee71849dd7f51181f50ea746099a202384b9c64

See more details on using hashes here.

File details

Details for the file lightning_server-0.7.4-py3-none-any.whl.

File metadata

File hashes

Hashes for lightning_server-0.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ada0b0bb0324b2973bfc2dd712992f2c9849f5001b988fa56b656b5c7abfcf51
MD5 681a733d8b34cbbadf23449317cf1468
BLAKE2b-256 45a1b44ebfc822bce7f2d8930153a8fbdd2533d6b5afe0dfa7d84c367acda8cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page