Skip to content

1.0.0 Alpha 9

Compare
Choose a tag to compare
@ZeroIntensity ZeroIntensity released this 04 Feb 20:53
· 310 commits to master since this release
63f496e

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 context decorator and the Context type
  • Added the headers parameter to functions on TestingContext
  • Added Route.middleware
  • Added route and App.route
  • Added docstrings to router functions
  • Added the JSON response class
  • Added the custom body translate strategy
  • Added the extract_path utility
  • Added the view build command
  • Added App.template
  • Added compile_type and TCValidator
  • Added markdown and App.markdown
  • Added the Error class
  • Added the error_class parameter to both new_app and App
  • Added the ERROR_CODES constant

Bug Fixes

  • Fixed syntax errors in view init
  • Fixed template attribute with the view template renderer

Other Changes

  • Modified some behavior of automatic route inputs
  • Routes with equivalent paths but different methods now return 405 Method Not Allowed when accessed
  • Route errors now display the error message when dev is True
  • Changed exception rendering in route errors to use the rich renderer

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.