Lamp
An asynchronous webserver made with sockets! (Not Finished)
Examples of using Lamp:
from WebLamp import Lamp, Connection
server = Lamp()
@server.route(route = '/', method = ['GET'])
async def home(conn: Connection) -> bytes:
conn.set_status(200)
conn.set_body(b'Hello World!')
return conn.response
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(route = re.compile(r'^/u/(?P<userid>[0-9]*)$'), method = ['GET'])
async def home(conn: Connection) -> bytes:
userid = conn.args['userid'] # this came from the regex that was provided
conn.set_status(200)
conn.set_body(f'{userid}'.encode())
return conn.response
server.run(("127.0.0.1", 5000))
Metadata
Release files for WebLamp 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| WebLamp-0.1.6.tar.gz | 5.7 kB | Without provenance | Details for WebLamp-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| WebLamp-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for WebLamp-0.1.6-py3-none-any.whl |
Total release size: 12.8 kB
Release files / WebLamp-0.1.6.tar.gz
| Download URL | WebLamp-0.1.6.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb100116c7e083b203842310308f2a3f6508f20dfbbc705a08857077366ed360
|
|
BLAKE2b-256 checksum How to use checksums |
cbcf1fbe65d14087d7dbe2a9995f38627e8ecc3aaedd717310be78293d4d83b7
|
| 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.0
|
Release files / WebLamp-0.1.6-py3-none-any.whl
| Download URL | WebLamp-0.1.6-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2cd2b6deb8985dd96346c7849207cf4e4e241fd2604262bba6de045f110de87d
|
|
BLAKE2b-256 checksum How to use checksums |
1963b26deeca42e497d5895797d8cd0b42ea4b3685ced71e4af219c5238d816d
|
| 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.0
|
Security for WebLamp 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.