express.py
Python implementation of the widely used express.js
Why
Going to answer this first: because yes. More out of boredom and wanting to do something with my time rather than playing games. But oh well, here it is.
Installation
Install this package with a very very very very very simple command:
# Unix / macOS:
python3 -m pip install --upgrade web-express-py
# Windows:
py -3 -m pip install --upgrade web-express-py
After this, you can just import express into any of your projects using:
from express import express
Ok here comes stealing examples from express.js
Hello world example
from express import express
app = express()
@app.get("/")
def helloWorld(req, res):
res.send("Hello World!")
app.listen(3000)
Basic routing
from express import express
app = express()
@app.get("/")
def helloWorld(req, res):
res.send("Hello World!")
@app.post("/")
def aPostRequest(req, res):
res.send("Got a POST request")
@app.put("/user")
def updateUser(req, res):
res.send("Got a PUT request at /user")
def deleteUser(req, res):
res.send("Got a DELETE request at /user")
app.delete("/user", deleteUser)
app.listen(3000)
More routing info
If you want to read all of the routing API through the guide???? click here
If you want to read all about how to setup middleware, read this
Metadata
Release files for web-express-py 0.0.10
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 |
|---|---|---|---|---|
| web_express_py-0.0.10.tar.gz | 25.6 kB | Without provenance | Details for web_express_py-0.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| web_express_py-0.0.10-py3-none-any.whl | Python 3 | none | any | Details for web_express_py-0.0.10-py3-none-any.whl |
Total release size: 50.5 kB
Release files / web_express_py-0.0.10.tar.gz
| Download URL | web_express_py-0.0.10.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7172c9ee416aeb00bfdebae2de100bad1160e1b6a4b7023d10405ebd7f2b9562
|
|
BLAKE2b-256 checksum How to use checksums |
49c98da9e59f0afe3161c4ff34a39059f0f935b5c00bd32179a2943e67d9cfac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / web_express_py-0.0.10-py3-none-any.whl
| Download URL | web_express_py-0.0.10-py3-none-any.whl |
|---|---|
| Size | 24.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
080607c7e9b214f33ea5ce0dee13de67d2cdd4308ffd4c7600a78907896418fe
|
|
BLAKE2b-256 checksum How to use checksums |
b21dfc52201b6e4e8e631a845ef554c18861df689b89593d82b91f936862b78b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for web-express-py 0.0.10
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.