ZeroIntensity / view.py

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

Type magic on route inputs #23

Closed ZeroIntensity closed 8 months ago

ZeroIntensity commented 1 year ago

On functions like query, I'm hoping there's a way to make it so type safety can force users to put in their parameters properly, like this:

@get("/")
@query("my_thing", str)
async def index():  # type checker error!
    return my_thing
ZeroIntensity commented 10 months ago

This doesn't seem possible now unfortunately.

ZeroIntensity commented 8 months ago

All code for this was scrapped in #127.