Skip to main content

Lamp

An asynchronous webserver made with sockets! (Not Finished)

Examples of using Lamp:

from WebLamp import Lamp, Connection

server = Lamp()

@server.route(path = '/', method = ['GET'])
async def home(conn: Connection) -> tuple:

    return 200, b'Hello World!'

server.run(("127.0.0.1", 5000))

1 unique thing about this webserver is you can use a regex in your route and domain!

from WebLamp import Lamp, Connection
import re

server = Lamp()

@server.route(path = re.compile(r'^/u/(?P<userid>[0-9]*)$'), method = ['GET'])
async def home(conn: Connection) -> tuple:

    userid = conn.args['userid'] # this came from the regex that was provided

    return 200, userid.encode()

server.run(("127.0.0.1", 5000))

Metadata

Release files for WebLamp 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for WebLamp 0.2.6
File Size Uploaded
WebLamp-0.2.6.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for WebLamp 0.2.6
File Interpreter ABI Platform
WebLamp-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / WebLamp-0.2.6.tar.gz

Download URL WebLamp-0.2.6.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
71a695f0bec8d7d8102a8f9ff382d285c6de7657c09b6a39c329d874538e8d14
BLAKE2b-256 checksum
How to use checksums
626910ef28c30913474b48e99e8f63aad05a966157a18a6ffa43bed7d4e68a6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.7

Release files / WebLamp-0.2.6-py3-none-any.whl

Download URL WebLamp-0.2.6-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a05418d53f7de7e9eede40c3d267f2672253e9863fa799bd4d8b9a817d202fc
BLAKE2b-256 checksum
How to use checksums
0028e51524889885178d90f48ace8451a22ebb6a5f13f68e7e8e8ab9e887ba52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.7

Release history Release notifications | RSS feed

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

This release

0.2.6 This release

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page