Repository navigation
1.0.0 Alpha 9
1.0.0 Alpha 9
Quickstart
$ pip install -U view.py
Breaking Change
The body parameter in Response is now required. For example, the following code does not work on Alpha 9:
from view import new_app, Response
app = new_app()
@app.get("/")
def index():
res = Response()
return res
app.run()What's New?
- Added the
contextdecorator and theContexttype - Added the
headersparameter to functions onTestingContext - Added
Route.middleware - Added
routeandApp.route - Added docstrings to router functions
- Added the
JSONresponse class - Added the
custombody translate strategy - Added the
extract_pathutility - Added the
view buildcommand - Added
App.template - Added
compile_typeandTCValidator - Added
markdownandApp.markdown - Added the
Errorclass - Added the
error_classparameter to bothnew_appandApp - Added the
ERROR_CODESconstant
Bug Fixes
- Fixed syntax errors in
view init - Fixed
templateattribute with theviewtemplate renderer
Other Changes
- Modified some behavior of automatic route inputs
- Routes with equivalent paths but different methods now return
405 Method Not Allowedwhen accessed - Route errors now display the error message when
devisTrue - Changed exception rendering in route errors to use the
richrenderer
Docs Change
Docs have been completely rewritten! Changes and fixes for it will roll out over time. You can check out the new docs at view.zintensity.dev
This update also introduces the View Insiders program! See the docs or my sponsors page for more info.