Warning
view.py is currently in alpha, and may be lacking some features. If you would like to follow development progress, be sure to join the discord.
- Batteries Detachable: Don't like our approach to something? No problem! We aim to provide native support for all your favorite libraries, as well as provide APIs to let you reinvent the wheel as you wish.
- Lightning Fast: Powered by pyawaitable, view.py is the first web framework to implement ASGI in pure C, without the use of external transpilers.
- Developer Oriented: view.py is developed with ease of use in mind, providing a rich documentation, docstrings, and type hints.
See why I wrote it on the docs.
from view import new_app
app = new_app()
@app.get("/")
async def index():
return await app.template("index.html", engine="jinja")
app.run()
# routes/index.py
from view import get, HTML
# Build TypeScript Frontend
@get(steps=["typescript"], cache_rate=1000)
async def index():
return await HTML.from_file("dist/index.html")
from view import JSON, body, post
@post("/create")
@body("name", str)
@body("books", dict[str, str])
def create(name: str, books: dict[str, str]):
# ...
return JSON({"message": "Successfully created user!"}), 201
view.py is put through rigorous testing, checked with Valgrind, and checks for memory leaks, thanks to Memray. See the testing badges at the top.
Python 3.8+ is required.
$ pip install git+https://github.com/ZeroIntensity/view.py
$ pip install view.py
$ pipx install view.py
view.py
is distributed under the terms of the MIT license.