ZeroIntensity / view.py

The Batteries-Detachable Web Framework
https://view.zintensity.dev
MIT License
205 stars 15 forks source link

Fix Synchronous Routes #127

Closed ZeroIntensity closed 8 months ago

ZeroIntensity commented 8 months ago

This closes #101.

This introduces a breaking API change. Route inputs are now applied in the order that they are appear in code, instead of the order they are applied as decorators. For example, the below now works as intended:

from view import new_app

app = new_app()

@app.get("/")
@app.query("a", str)
@app.query("b", str)
async def index(a: str, b: str) -> None:
    return a + b

app.run()
netlify[bot] commented 8 months ago

Deploy Preview for viewpy ready!

Name Link
Latest commit 96746e12d8800d4ff3390d2d26868114cbdbb182
Latest deploy log https://app.netlify.com/sites/viewpy/deploys/65adcaa1ddf8240008a976c9
Deploy Preview https://deploy-preview-127--viewpy.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.