view.py
view.py copied to clipboard
The Batteries-Detachable Web Framework
### Description: As of now, view.py only supports sending and receiving `str` objects, not bytes. This shouldn’t be too hard to implement for sending, but will probably require some changes...
### Feature description As a means of making things easier for the developer, View could support using `yield` as a means of returning a partial response. For example, the user...
### Feature description For compatibility with ASGI toolkits like [Starlette](https://www.starlette.io/), view.py should make it possible to defer the ASGI `scope`, `receive`, and `send`. This will allow someone to for example,...
### Feature description [NextJS](https://nextjs.org) has [their own way](https://nextjs.org/docs/app/building-your-application/data-fetching) of handling fetching from servers by caching the request. It shouldn't be super hard to implement this for view. ### Feature example...
### Description: The `view init` command uses [Click](https://click.palletsprojects.com/en/8.1.x/) for prompts (as seen [here](https://github.com/ZeroIntensity/view.py/blob/master/src/view/__main__.py#L301)), but I don't really like how they look (especially for options with a set number of responses,...
This closes #111, #136, #139, and #109.
### Improvement Description [Memray](https://bloomberg.github.io/memray/) should be used to ensure there are no memory leaks throughout the C API ### Improvement Request Example API N/A ### Anything else? [pytest-memray](https://pytest-memray.readthedocs.io/en/latest/) looks like...
### Feature description For "batteries-detachable" purposes, there should be an API for creating custom loaders. Perhaps some plugin API could be introduced with this? (If so, that will be a...
As of now, the global attributes on components don't support things like events because there's no way to run Python in the browser. We could use #11 as a solution,...
Database ORM
Waiting on #9, probably. Should probably support SQLite first. Hypothetical API: ```py @model() class User: name: str password: Hashed[str] id: Id[int] = auto_increment() @post("/signup") @body("data", User) async def signup(data: User):...