Nextpress
A Python web framework inspired by Express.js, built on ASGI.
Installation
pip install nextpress
Quick Start
from nextpress import Nextpress, Request, Response, Anext
app = Nextpress()
async def logger(request: Request, response: Response, anext: Anext):
print(f"{request.method} {request.path}")
response.set_header("X-Processed-Time", str(time.time()))
await anext()
async def hello(response: Response[str]):
await response.send("Hello, World!")
app.get("/", logger, hello)
Run with:
uvicorn example:app
Features
- Express-style routing with
<method>()anduse() - Route based middleware support with
anext()pattern - Explicit response writing
- Modular middlewares to parse input
- Route matching and chaining
- Built on uvicorn/ASGI for async performance
- Response and Request generics for typing
Future features (feautures?)
- Pydantic validation of request and response
- CORS, multipart/form body parser, and other middlewares
- Actual tests
- Websocket handling
Release files for nextpress 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nextpress-0.1.0.tar.gz | 20.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nextpress-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.8 kB
Release files / nextpress-0.1.0.tar.gz
| Download URL | nextpress-0.1.0.tar.gz |
|---|---|
| Size | 20.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d79dcf9e7557193eb8e5f026e6d086ec816ab632b28d4802fa8090d7cd163e7
|
|
BLAKE2b-256 checksum How to use checksums |
552f54bb881c351c9389b9c58b7d5e57025fe022ac697544a5d92036bb2c6848
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Release files / nextpress-0.1.0-py3-none-any.whl
| Download URL | nextpress-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d7c7a343e76a2596ddbe537d20837d9a6b7b2c5a9c37078515f3de730456166
|
|
BLAKE2b-256 checksum How to use checksums |
87f1d6f9adb813c9070d370f153c8c02d30bd561b8198c805f9dec1535cc60c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|