Skip to main content

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>() and use()
  • 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)

Source distribution for nextpress 0.1.0
File Size Uploaded
nextpress-0.1.0.tar.gz 20.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nextpress 0.1.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.0 This release

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