Releases: ZeroIntensity/view.py
1.0.0 Alpha 10
1.0.0 Alpha 10
Quickstart
This update suggests pipx
as the installation tool! Install it through pipx
with:
$ pipx install view.py
Or, if you want to do it the old way:
$ pip install -U view.py
What's new?
- Added the
view docs
command - Added the
websocket
router (unfinished) - Added a startup message
- Added support for
daphne
andhypercorn
as servers - Added documentation for
view.env
and added environment variables to configuration - Added
patterns
loader toview init
- Added
build
to config - Added the
build_app
andbuild_steps
functions - Added the
to_response
function - Added preset values to the
view.toml
generated byview init
- Added prettier input prompts to
view init
- Added
HTML.from_file
Bug Fixes
- Fixed fancy logging not exiting after a
KeyboardInterrupt
Other Changes
- Reworked internal logging API and changed default logger format
- Removed dead file
src/view/nodes.py
andsrc/view/compiler.py
Route.__call__
is now used internally overRoute.func
- Made hijack optional in fancy mode
- Updated internal C API structure
- Improved type checking on functions decorated with a router function
- Breaking Change: Middleware functions must now take
call_next
Docs Change
This update switches over to mkdocs-material for the docs, but it is planned to use the custom theme again once it's cleaned up a bit.
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
context
decorator and theContext
type - Added the
headers
parameter to functions onTestingContext
- Added
Route.middleware
- Added
route
andApp.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
andTCValidator
- Added
markdown
andApp.markdown
- Added the
Error
class - Added the
error_class
parameter to bothnew_app
andApp
- Added the
ERROR_CODES
constant
Bug Fixes
- Fixed syntax errors in
view init
- Fixed
template
attribute with theview
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
isTrue
- 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.
1.0.0 Alpha 8
- Added optional dependencies for
databases
andtemplates
- Added environment prefixes for database configuration
- Added
templates
andTemplatesConfig
to config - Added the
templates
function - Added support for
attrs
in type validation - Added documentation for caching
- Added the
cache_rate
parameter to routers - Removed
psutil
andplotext
as a global dependency - Added
fancy
optional dependencies - Fixed route inputs with synchronous routes
- Breaking Change: Route inputs are now applied in the order of the decorator call as it appears in code
v1.0.0 Alpha 7
- Remerged the
new-init
branch (didn't work properly the first time, for whatever reason).
1.0.0 Alpha 6
-
Added
get_app
-
Added documentation generation
-
Added database support (NOT FINISHED)
-
Added support for lists in type validation
-
Added support for implicit query parameters
-
Added
debug
,info
,warning
,error
, andcritical
logging functions -
Added
InvalidRouteError
,DuplicateRouteError
,ViewInternalError
, andConfigurationError
-
Added logging functions to
App
-
Added
patterns
loader -
Added handling of relative paths in the configuration setting
loader_path
-
Added path to
PATH
environment variable during loading -
Added exists validation to
loader_path
-
Removed
attempt_import
andMissingLibraryError
-
Renamed
debug
toenable_debug
-
Renamed
EnvironmentError
toBadEnvironmentError
-
Changed environment prefixes for configuration
-
Rewrote documentation
-
Upgraded
view init
1.0.0 Alpha 5
- Added
app.query
andapp.body
- Patched warning with starting app from incorrect filename
- Updated
__all__
forrouting.py
- Added
view.Response
andview.HTML
- Fixed
__view_result__
- Added support for
__view_body__
and__view_construct__
- Added support for Pydantic,
NamedTuple
, and dataclasses for type validation - Support for direct union types (i.e.
str | int
,Union[str, int]
) on type validation - Added support for non async routes
1.0.0 Alpha 4
- Added type validation (without support for view_body)
- Patched query strings on app testing
- Added tests for query and body parameters
- Patched body parameters
- Documented type validation
- Patched bodies with testing
1.0.0 Alpha 3
- Patched header responses
- Added tests for headers
- Updated repr for
Route
- Patched responses with three values
- Documented responses and result protocol
1.0.0 Alpha 2
- Added App.test()
- Added warning when filename does not match app_path
- Added more tests
- Upgrade CIBW to work on 3.11
Alpha Release
- Configuration
- Routing
- Query, body, and path parameters
- Components