-
-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: Replace Starlette Responses (#626)
* initial * updated folder structure * add file response * added tests * add anyio * cleanup tests * cleanup * finished test coverage * added docstrings * updated reference docs * updated docs * Update docs/usage/16-templating/2-template-functions.md Co-authored-by: Peter Schutt <[email protected]> * Update starlite/response/base.py Co-authored-by: Peter Schutt <[email protected]> * addressed review comments * cleanup imports * updated response containers * addressed review comment * updated response containers missing args * updated tests * fix bound variable * fixed typing * fix bound variable * removed constraint * update docstrings * update coverage * Update ASGI router (#644) * removed starlette dependency for lifespan events * updated tests * fix async callable * added cookie parser (#645) * added cookie parser * address review comments * Replace get name (#646) * add get_name helper * added helper to handle enum * update enum safeguard * Removed starlette HTTPException as code dependency (#647) * removed starlette HTTPException as code dependency * address review comments * Replace background tasks (#652) * updated background tasks * updated test and docs * address review comment * fix lgtm issues and cleanup * addressed review comments * updated tests Co-authored-by: Peter Schutt <[email protected]>
- Loading branch information
1 parent
e58dd11
commit 0949b14
Showing
167 changed files
with
3,335 additions
and
1,421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
max-complexity = 12 | ||
ignore = E501, B008, W503, C408, B009, B023, C417, PT006, PT007, PT004, PT012, SIM401, E225, E203, SCS108 | ||
ignore = E501,E225,W503,B008,E203 | ||
type-checking-pydantic-enabled = true | ||
type-checking-fastapi-enabled = true | ||
classmethod-decorators = | ||
classmethod | ||
validator | ||
root_validator | ||
per-file-ignores = | ||
examples/dependency_injection/dependency_non_optional_not_provided.py:E800 | ||
starlite/types/builtin_types.py:E800,F401 | ||
examples/*:SCS108 | ||
starlite/types/builtin_types.py:F401 | ||
tests/*:SCS108 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Base HTTP Response | ||
|
||
::: starlite.response.Response | ||
options: | ||
members: | ||
- __init__ | ||
- __call__ | ||
- after_response | ||
- content_length | ||
- delete_cookie | ||
- encoded_headers | ||
- render | ||
- send_body | ||
- serializer | ||
- set_cookie | ||
- set_etag | ||
- set_header | ||
- start_response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Streaming Response | ||
|
||
::: starlite.response.StreamingResponse | ||
options: | ||
members: | ||
- __init__ | ||
- __call__ | ||
- after_response | ||
- content_length | ||
- delete_cookie | ||
- encoded_headers | ||
- send_body | ||
- set_cookie | ||
- set_etag | ||
- set_header | ||
- start_response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# File Response | ||
|
||
::: starlite.response.FileResponse | ||
options: | ||
members: | ||
- __init__ | ||
- __call__ | ||
- after_response | ||
- content_length | ||
- delete_cookie | ||
- encoded_headers | ||
- send_body | ||
- set_cookie | ||
- set_etag | ||
- set_header | ||
- start_response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Template Response | ||
|
||
::: starlite.response.TemplateResponse | ||
options: | ||
members: | ||
- __init__ | ||
- __call__ | ||
- after_response | ||
- content_length | ||
- delete_cookie | ||
- encoded_headers | ||
- send_body | ||
- set_cookie | ||
- set_etag | ||
- set_header | ||
- start_response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Redirect Response | ||
|
||
::: starlite.response.RedirectResponse | ||
options: | ||
members: | ||
- __init__ | ||
- __call__ | ||
- after_response | ||
- content_length | ||
- delete_cookie | ||
- encoded_headers | ||
- send_body | ||
- set_cookie | ||
- set_etag | ||
- set_header | ||
- start_response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.