diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a2919af8e0..7652a8589e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,7 +10,7 @@ repos:
exclude: "\\.idea/(.)*"
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
- rev: v2.37.2
+ rev: v2.37.3
hooks:
- id: pyupgrade
args: ["--py37-plus"]
@@ -42,7 +42,7 @@ repos:
exclude: "test_*"
args: ["-iii", "-ll", "-s=B308,B703"]
- repo: https://github.com/hadialqattan/pycln
- rev: v2.0.4 # Possible releases: https://github.com/hadialqattan/pycln/releases
+ rev: v2.1.1 # Possible releases: https://github.com/hadialqattan/pycln/releases
hooks:
- id: pycln
args: [--config=pyproject.toml]
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 574e0604e1..9794ff9b0c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -287,3 +287,7 @@
- Allow `Partial` to annotate fields of nested classes @Harry-Lees
- Add `OpenAPIConfig.use_handler_docstring` param
+
+[1.7.3]
+
+- Fix to routes being allowed under static paths and improvements to path resolution @Dr-Emann
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 55e6d53ff5..4edf921b51 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -3,65 +3,75 @@
To contribute code changes or update the documentation, please follow these steps:
1. Fork the upstream repository and clone the fork locally.
-2. Install [poetry](https://python-poetry.org/), and install the project's dependencies with `poetry install --extras testing`
-3. Install [pre-commit](https://pre-commit.com/) and install the hook by running `pre-commit install`
+2. Install [poetry](https://python-poetry.org/), and install the project's dependencies
+ with `poetry install --extras testing`.
+3. Install [pre-commit](https://pre-commit.com/) and install the hooks by running `pre-commit install` in the
+ repository's hook.
4. Make whatever changes and additions you wish and commit these - please try to keep your commit history clean.
-5. Create a pull request to the main repository with an explanation of your changes
+5. Create a pull request to the main repository with an explanation of your changes. The PR should detail the
+ contribution and link to any related issues - if existing.
-Note: if you add new code or modify existing code - 100% test coverage is mandatory and tests should be well written.
+## Code Contribution Guidelines
----
+1. if you are adding or modifying existing code, please make sure to test everything you are doing. 100% test coverage
+ is mandatory and tests should be well
+ written.
+2. All public functions and methods should be documented with a doc string. The project uses
+ the [google style docstring](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html).
+ Private methods should have a doc string explaining what they do, but do not require an elaborate doc string.
-## Tox for testing against different versions
+## Project Documentation
-### Config
+The documentation is located under the `/doc` folder, with the `mkdocs.yml` file in the project root.
-1. Install and configure [pyenv](https://github.com/pyenv/pyenv)
-2. Install required python versions via pyenv, e.g., `$ pyenv install 3.x.x` for each required version.
-3. In root directory of library, create .python-version file in root, e.g.:
-
-```text
-3.10.5
-3.9.13
-3.8.13
-3.7.13
-```
-
-4. Restart shell or run command like: `$ pyenv shell 3.10.5 3.9.13 3.8.13 3.7.13`
-5. Remove any existing poetry environment: `$ poetry env remove python`
-6. Tell poetry to use system python 1: `$ poetry env use system`
-7. `$ poetry install`
+### Docs Theme and Appearance
-1: Not sure if this is the "right" way to handle this yet, however this prevents poetry from reusing
-the local environment in each of the tox environments.
+We welcome contributions that enhance / improve the appearance and usability of the docs, as well as any images, icons
+etc.
-### Run
+We use the excellent [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) theme, which comes with a lot
+of options out of the box. If you wish to contribute to the docs style / setup, or static site generation, you should
+consult the theme docs as a first step.
-`$ poetry run tox`
+### Running the Docs Locally
-#### force recreate tox environments
+To run the docs locally, use docker and follow these steps:
-`$ poetry run tox -r`
+- pull the theme image with `docker pull squidfunk/mkdocs-material`
+- run the docs site locally with `docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material`
-#### run specific tox environment
+### Writing and Editing Docs
-`$ poetry run tox -e py37`
+We welcome contributions that enhance / improve the content of the docs. Feel free to add examples, clarify text,
+restructure the docs etc. But make sure to follow these emphases:
-#### run pre-commit only
+- the docs should be as simple and easy to grasp as possible.
+- the docs should be written in good idiomatic english.
+- examples should be simple and clear.
+- provide links where applicable.
+- provide diagrams where applicable and possible.
-`$ poetry run tox -e lint`
+## Testing multiple python versions
----
+Since the library needs to be compatible with older versions of python as well, it can be useful to run tests locally
+against different python versions. To achieve this you can use the `tox` config that is included by doing the following.
-## Contributing to the documentation
-
-From the squidfunk/mkdocs-material [docker quick start guide](https://hub.docker.com/r/squidfunk/mkdocs-material):
+1. Install [pyenv](https://github.com/pyenv/pyenv).
+2. Install required python versions via pyenv, e.g., `$ pyenv install 3.x.x` for each required version.
+3. In root directory of library, create .python-version file in root.
+4. Restart shell.
+5. Remove any existing poetry environment: `$ poetry env remove python`
+6. Tell poetry to use system python 1: `$ poetry env use system`
+7. `$ poetry install`
-`docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material`
+### Tox Commands
----
+- Run: `$ poetry run tox`
+- Force recreate tox environments: `$ poetry run tox -r`
+- Run specific tox environment: `$ poetry run tox -e py37`
+- Run pre-commit only: `$ poetry run tox -e lint`
-## Release workflow
+## Release workflow (Maintainers only)
1. Update changelog.md
2. Increment the version in pyproject.toml.
diff --git a/docs/usage/0-the-starlite-app/0-the-starlite-app.md b/docs/usage/0-the-starlite-app/0-the-starlite-app.md
index 104b3e26c9..c46ac547f7 100644
--- a/docs/usage/0-the-starlite-app/0-the-starlite-app.md
+++ b/docs/usage/0-the-starlite-app/0-the-starlite-app.md
@@ -31,13 +31,13 @@ The Starlite constructor accepts the following additional kwargs:
- `cors_config`: An instance of `starlite.config.CORSConfig`. If set this enables the [CORSMiddleware](../7-middleware.md#built-in-middlewares).
- `debug`: A boolean flag toggling debug mode on and off, if True, 404 errors will be rendered as HTML with a stack trace. This option should _not_ be used in production. Defaults to `False`.
- `dependencies`: A dictionary mapping dependency providers. See [dependency-injection](../6-dependency-injection.md).
-- `exception_handlers`: A dictionary mapping exceptions or exception codes to handler functions. See [exception-handlers](../../17-exceptions#exception-handling).
+- `exception_handlers`: A dictionary mapping exceptions or exception codes to handler functions. See [exception-handlers](../17-exceptions#exception-handling).
- `guards`: A list of guard callable. See [guards](../9-guards.md).
- `middleware`: A list of middlewares. See [middleware](../7-middleware.md).
- `on_shutdown`: A list of callables that are called during the application shutdown. See [startup-and-shutdown](./1-startup-and-shutdown.md).
- `on_startup`: A list of callables that are called during the application startup. See [startup-and-shutdown](./1-startup-and-shutdown.md).
- `openapi_config`: An instance of `starlite.config.OpenAPIConfig`. Defaults to the baseline config. See [open-api](../12-openapi.md).
-- `parameters`: A mapping of parameters definition that will be available in all application paths. See [layered parameters](../3-parameters.md#layered-parameters).
+- `parameters`: A mapping of parameters definition that will be available in all application paths. See [layered parameters](../3-parameters/4-layered-parameters.md).
- `response_class`: A custom response class to be used as the app's default. See [using-custom-responses](../5-responses.md#using-custom-responses).
- `response_headers`: A dictionary of `ResponseHeader` instances. See [response-headers](../5-responses.md#response-headers).
- `static_files_config`: An instance or list of `starlite.config.StaticFilesConfig`. See [static files](./3-static-files.md).
diff --git a/docs/usage/0-the-starlite-app/1-startup-and-shutdown.md b/docs/usage/0-the-starlite-app/1-startup-and-shutdown.md
index 74a25778d4..a039d98dc4 100644
--- a/docs/usage/0-the-starlite-app/1-startup-and-shutdown.md
+++ b/docs/usage/0-the-starlite-app/1-startup-and-shutdown.md
@@ -19,12 +19,22 @@ from typing import cast
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from starlite import Starlite, State
+from pydantic import BaseSettings
+
+
+class AppSettings(BaseSettings):
+ POSTGRES_CONNECTION_STRING: str
+
+
+settings = AppSettings()
def get_postgres_connection(state: State) -> AsyncEngine:
"""Returns the Postgres connection. If it doesn't exist, creates it and saves it in on the application state object"""
if not state.postgres_connection:
- state.postgres_connection = create_async_engine(settings.DATABASE_URI)
+ state.postgres_connection = create_async_engine(
+ settings.POSTGRES_CONNECTION_STRING
+ )
return cast(AsyncEngine, state.postgres_connection)
diff --git a/docs/usage/1-routing/2-routers.md b/docs/usage/1-routing/2-routers.md
index 1dbe3dbc12..cdf12de8fa 100644
--- a/docs/usage/1-routing/2-routers.md
+++ b/docs/usage/1-routing/2-routers.md
@@ -26,10 +26,10 @@ The `starlite.router.Router` constructor also accepts the following kwargs:
- `after_response`: A [after response lifecycle hook handler](../13-lifecycle-hooks.md#after-response).
- `before_request`: A [before request lifecycle hook handler](../13-lifecycle-hooks.md#before-request).
- `dependencies`: A dictionary mapping dependency providers. See [dependency-injection](../6-dependency-injection.md).
-- `exception_handlers`: A dictionary mapping exceptions or exception codes to handler functions. See [exception-handlers](../../17-exceptions#exception-handling).
+- `exception_handlers`: A dictionary mapping exceptions or exception codes to handler functions. See [exception-handlers](../17-exceptions#exception-handling).
- `guards`: A list of guard callable. See [guards](../9-guards.md).
- `middleware`: A list of middlewares. See [middleware](../7-middleware.md).
-- `parameters`: A mapping of parameters definition that will be available on all sub route handlers. See [layered parameters](../3-parameters.md#layered-parameters).
+- `parameters`: A mapping of parameters definition that will be available on all sub route handlers. See [layered parameters](../3-parameters/4-layered-parameters.md).
- `response_class`: A custom response class to be used as the app's default. See [using-custom-responses](../5-responses.md#using-custom-responses).
- `response_headers`: A dictionary of `ResponseHeader` instances. See [response-headers](../5-responses.md#response-headers).
- `tags`: A list of tags to add to the openapi path definitions defined on the router. See [open-api](../12-openapi.md).
diff --git a/docs/usage/1-routing/3-controllers.md b/docs/usage/1-routing/3-controllers.md
index 1e95051baa..bf29eda0a6 100644
--- a/docs/usage/1-routing/3-controllers.md
+++ b/docs/usage/1-routing/3-controllers.md
@@ -56,10 +56,10 @@ Aside from the `path` class variable see above, you can also also define the fol
- `after_response`: A [after response lifecycle hook handler](../13-lifecycle-hooks.md#after-response).
- `before_request`: A [before request lifecycle hook handler](../13-lifecycle-hooks.md#before-request).
- `dependencies`: A dictionary mapping dependency providers. See [dependency-injection](../6-dependency-injection.md).
-- `exception_handlers`: A dictionary mapping exceptions or exception codes to handler functions. See [exception-handlers](../../17-exceptions#exception-handling).
+- `exception_handlers`: A dictionary mapping exceptions or exception codes to handler functions. See [exception-handlers](../17-exceptions#exception-handling).
- `guards`: A list of guard callable. See [guards](../9-guards.md).
- `middleware`: A list of middlewares. See [middleware](../7-middleware.md).
-- `parameters`: A mapping of parameters definition that will be available on all sub route handlers. See [layered parameters](../3-parameters.md#layered-parameters).
+- `parameters`: A mapping of parameters definition that will be available on all sub route handlers. See [layered parameters](../3-parameters/4-layered-parameters.md).
- `response_class`: A custom response class to be used as the app's default. See [using-custom-responses](../5-responses.md#using-custom-responses).
- `response_headers`: A dictionary of `ResponseHeader` instances. See [response-headers](../5-responses.md#response-headers).
- `tags`: A list of tags to add to the openapi path definitions defined on the router. See [open-api](../12-openapi.md).
diff --git a/docs/usage/10-plugins.md b/docs/usage/10-plugins.md
index 9fdbc8512c..83984cd3b9 100644
--- a/docs/usage/10-plugins.md
+++ b/docs/usage/10-plugins.md
@@ -206,52 +206,51 @@ from pydantic import BaseModel
class MyClass:
- """
- The class for which we create a plugin. For example, could be a base ORM class such as "Model" or "Document" etc.
- """
-
- ...
-
-
-def to_pydantic_model_class(
- self, model_class: Type[MyClass], **kwargs: Any
-) -> Type[BaseModel]:
- """
- Given a model_class T, convert it to a subclass of the pydantic BaseModel
- """
- ...
-
-
-@staticmethod
-def is_plugin_supported_type(value: Any) -> bool:
- """
- Given a value of indeterminate type, determine if this value is supported by the plugin by returning a bool.
- """
...
-def from_pydantic_model_instance(
- self, model_class: Type[MyClass], pydantic_model_instance: BaseModel
-) -> T:
+class MyPlugin:
"""
- Given an instance of a pydantic model created using a plugin's 'to_pydantic_model_class',
- return an instance of the class from which that pydantic model has been created.
-
- This class is passed in as the 'model_class' kwarg.
+ The class for which we create a plugin. For example, could be a base ORM class such as "Model" or "Document" etc.
"""
- ...
-
-def to_dict(self, model_instance: MyClass) -> Dict[str, Any]:
- """
- Given an instance of a model supported by the plugin, return a dictionary of serializable values.
- """
...
-
-def from_dict(self, model_class: Type[MyClass], **kwargs: Any) -> MyClass:
- """
- Given a class supported by this plugin and a dict of values, create an instance of the class
- """
- ...
+ def to_pydantic_model_class(
+ self, model_class: Type[MyClass], **kwargs: Any
+ ) -> Type[BaseModel]:
+ """
+ Given a model_class T, convert it to a subclass of the pydantic BaseModel
+ """
+ ...
+
+ @staticmethod
+ def is_plugin_supported_type(value: Any) -> bool:
+ """
+ Given a value of indeterminate type, determine if this value is supported by the plugin by returning a bool.
+ """
+ ...
+
+ def from_pydantic_model_instance(
+ self, model_class: Type[MyClass], pydantic_model_instance: BaseModel
+ ) -> T:
+ """
+ Given an instance of a pydantic model created using a plugin's 'to_pydantic_model_class',
+ return an instance of the class from which that pydantic model has been created.
+
+ This class is passed in as the 'model_class' kwarg.
+ """
+ ...
+
+ def to_dict(self, model_instance: MyClass) -> Dict[str, Any]:
+ """
+ Given an instance of a model supported by the plugin, return a dictionary of serializable values.
+ """
+ ...
+
+ def from_dict(self, model_class: Type[MyClass], **kwargs: Any) -> MyClass:
+ """
+ Given a class supported by this plugin and a dict of values, create an instance of the class
+ """
+ ...
```
diff --git a/docs/usage/11-data-transfer-objects.md b/docs/usage/11-data-transfer-objects.md
index 5b5ef89b01..0b0a703c6e 100644
--- a/docs/usage/11-data-transfer-objects.md
+++ b/docs/usage/11-data-transfer-objects.md
@@ -121,7 +121,7 @@ class MyClassDTO(BaseModel):
third: int
```
-2. You can remap name and type. To do this use a tuple instead of a string for the object value:
+You can remap name and type. To do this use a tuple instead of a string for the object value:
```python
from pydantic import BaseModel
@@ -208,6 +208,7 @@ PartialCompanyDTO = Partial[CompanyDTO]
The created `PartialCompanyDTO` is equivalent to the following declaration:
```python
+from typing import Optional
from pydantic import BaseModel
@@ -220,12 +221,16 @@ class PartialCompanyDTO(BaseModel):
`Partial` can also be used inline when creating routes.
```python
-from pydantic import UUID4
+from pydantic import UUID4, BaseModel
from starlite.controller import Controller
from starlite.handlers import patch
from starlite.types import Partial
-from my_app.orders.models import UserOrder
+
+class UserOrder(BaseModel):
+ order_id: UUID4
+ order_item_id: UUID4
+ notes: str
class UserOrderController(Controller):
@@ -277,12 +282,28 @@ When you have an instance of a DTO model, you can convert it into a model instan
```python
from starlite import get
+from sqlalchemy import Column, Float, Integer, String
+from sqlalchemy.orm import declarative_base
+from starlite import DTOFactory
+from starlite.plugins.sql_alchemy import SQLAlchemyPlugin
+
+dto_factory = DTOFactory(plugins=[SQLAlchemyPlugin()])
+
+Base = declarative_base()
+
+
+class Company(Base):
+ id = Column(Integer, primary_key=True)
+ name = Column(String)
+ worth = Column(Float)
+
+
+CompanyDTO = dto_factory("CompanyDTO", Company)
@get()
def create_company(data: CompanyDTO) -> Company:
- company_instance = data.to_model_instance()
- ...
+ return data.to_model_instance()
```
In the above `company_instance` is an instance of the SQL Alchemy class `Company`. It is correctly typed as Company
diff --git a/docs/usage/12-openapi.md b/docs/usage/12-openapi.md
index 2161eeb637..bb7f615b79 100644
--- a/docs/usage/12-openapi.md
+++ b/docs/usage/12-openapi.md
@@ -131,7 +131,7 @@ If you would like to modify the base path, add new endpoints, change the styling
For example, lets say we wanted to change the base path from "/schema" to "/api-docs":
-```python title="my_app/openapi.py"
+```python
from starlite import OpenAPIController
@@ -149,9 +149,12 @@ The following extra attributes are defined on this controller and are customizab
We would then use the subclassed controller like so:
```python
-from starlite import Starlite, OpenAPIConfig
+from starlite import Starlite, OpenAPIConfig, OpenAPIController
+
+
+class MyOpenAPIController(OpenAPIController):
+ path = "/api-docs"
-from my_app.openapi import MyOpenAPIController
app = Starlite(
route_handlers=[...],
diff --git a/docs/usage/15-templating.md b/docs/usage/15-templating.md
index 9aa4a56d42..16326f1479 100644
--- a/docs/usage/15-templating.md
+++ b/docs/usage/15-templating.md
@@ -61,15 +61,15 @@ from typing import Protocol, Union, List
from pydantic import DirectoryPath
# the template class of the respective library
-from my_lib import MyTemplate
+from some_lib import SomeTemplate
-class TemplateEngineProtocol(Protocol[MyTemplate]):
+class TemplateEngineProtocol(Protocol[SomeTemplate]):
def __init__(self, directory: Union[DirectoryPath, List[DirectoryPath]]) -> None:
"""Builds a template engine."""
...
- def get_template(self, name: str) -> MyTemplate:
+ def get_template(self, name: str) -> SomeTemplate:
"""Loads the template with name and returns it."""
...
```
@@ -82,6 +82,10 @@ Once you have your custom engine you can register it as you would the built-in e
template engine instance. For example:
```python
+from starlite import TemplateConfig
+from starlite.template.jinja import JinjaTemplateEngine
+
+
def engine_callback(jinja_engine: JinjaTemplateEngine) -> JinjaTemplateEngine:
jinja_engine.engine.globals["key"] = "value"
return jinja_engine
diff --git a/docs/usage/17-exceptions.md b/docs/usage/17-exceptions.md
index d827c10b74..718b6ac9a3 100644
--- a/docs/usage/17-exceptions.md
+++ b/docs/usage/17-exceptions.md
@@ -177,13 +177,12 @@ layers for this purpose.
apply it wherever necessary to ensure consistent error responses across your application.
```python
-# app/core/exceptions.py
-
import logging
-
+from starlette.status import HTTP_500_INTERNAL_SERVER_ERROR
from starlette.responses import Response
from starlite.exceptions.utils import create_exception_response
from starlite.types import Request
+from starlite import Starlite
logger = logging.getLogger(__name__)
@@ -206,17 +205,7 @@ def logging_exception_handler(request: Request, exc: Exception) -> Response:
"""
logger.error("Application Exception", exc_info=exc)
return create_exception_response(exc)
-```
-
-Then, register it to your application, router, controller or handler, e.g.:
-
-```python
-# app/main.py
-
-from starlette.status import HTTP_500_INTERNAL_SERVER_ERROR
-from starlite import Starlite
-from app.core.exceptions import logging_exception_handler
app = Starlite(
...,
diff --git a/docs/usage/2-route-handlers/0_route_handlers_concept.md b/docs/usage/2-route-handlers/0_route_handlers_concept.md
index 374731a4d9..44691929b1 100644
--- a/docs/usage/2-route-handlers/0_route_handlers_concept.md
+++ b/docs/usage/2-route-handlers/0_route_handlers_concept.md
@@ -59,7 +59,7 @@ def my_route_handler() -> None:
...
```
-This is particularly useful when you want to have optional [path parameters](../3-parameters.md#path-parameters):
+This is particularly useful when you want to have optional [path parameters](../3-parameters/0-path-parameters.md):
```python
from starlite import get
@@ -79,7 +79,7 @@ kwargs are inspected by Starlite and then injected into the request handler.
The following sources can be accessed using annotated function kwargs:
-1. [path, query, header and cookie parameters](../3-parameters.md)
+1. [path, query, header and cookie parameters](../3-parameters/3-the-parameter-function.md)
2. [the request body](../4-request-body.md)
3. [dependencies](../6-dependency-injection.md)
diff --git a/docs/usage/2-route-handlers/1_http_route_handlers.md b/docs/usage/2-route-handlers/1_http_route_handlers.md
index 4eb26d9b43..59456cd9cf 100644
--- a/docs/usage/2-route-handlers/1_http_route_handlers.md
+++ b/docs/usage/2-route-handlers/1_http_route_handlers.md
@@ -58,7 +58,7 @@ Additionally, you can pass the following optional kwargs:
event loop. This has an effect only for sync handler functions.
See [using sync handler functions](#using-sync-handler-functions).
- `exception_handlers`: A dictionary mapping exceptions or exception codes to handler functions.
- See [exception-handlers](../../17-exceptions#exception-handling).
+ See [exception-handlers](../17-exceptions#exception-handling).
And the following kwargs, which affect [OpenAPI schema generation](../12-openapi.md#route-handler-configuration)
@@ -91,15 +91,16 @@ verb, which correlates with their name:
These are used exactly like `route` with the sole exception that you cannot configure the `http_method` kwarg:
```python
-from typing import List
-
from starlite import Partial, delete, get, patch, post, put
+from pydantic import BaseModel
+
-from my_app.models import Resource
+class Resource(BaseModel):
+ ...
@get(path="/resources")
-def list_resources() -> List[Resource]:
+def list_resources() -> list[Resource]:
...
diff --git a/docs/usage/3-parameters.md b/docs/usage/3-parameters.md
deleted file mode 100644
index 98420b4169..0000000000
--- a/docs/usage/3-parameters.md
+++ /dev/null
@@ -1,325 +0,0 @@
-# Parameters
-
-## Path Parameters
-
-```python
-from starlite import get
-
-from my_app.models import User
-
-
-@get(path="/user/{user_id:int}")
-def get_user(user_id: int) -> User:
- ...
-```
-
-In the above there are two components:
-
-1. The path parameter is defined inside the `path` kwarg passed to the _@get_ decorator in the
- form `{parameter_name:parameter_type}`. This definition of the path parameter is based on
- the [Starlette path parameter](https://www.starlette.io/routing/#path-parameters)
- mechanism. Yet, in difference to Starlette, which allows defining path parameters without defining their types,
- Starlite
- enforces this typing, with the following types supported: `int`, `float`, `str`, `uuid`.
-2. The `get_user` function defines a parameter with the same name as defined in the `path` kwarg. This ensures that
- the value of the path parameter will be injected into the function when it's called.
-
-The types do not need to match 1:1 - as long as parameter inside the function declaration is typed with a "higher" type
-to which the lower type can be coerced, this is fine. For example, consider this:
-
-```python
-from datetime import datetime
-from typing import List
-
-from starlite import get
-
-from my_app.models import Order
-
-
-@get(path="/orders/{from_date:int}")
-def get_orders(from_date: datetime) -> List[Order]:
- ...
-```
-
-The parameter defined inside the `path` kwarg is typed as `int`, because the value passed from the frontend will be a
-timestamp in milliseconds without any decimals. The parameter in the function declaration though is typed
-as `datetime.datetime`. This works because the int value will be passed to a pydantic model representing the function
-signature, which will coerce the int
-into a datetime. Thus, when the function is called it will be called with a datetime typed parameter.
-
-
-!!! note
- You only need to define the parameter in the function declaration if it's actually used inside the
- function. If the path parameter is part of the path, but the function doesn't use it, its fine to omit it.
- It will still be validated and added to the openapi schema correctly.
-
-### Extra Validation and Documentation for Path Params
-
-If you want to add validation or enhance the OpenAPI documentation generated for a given path parameter, you can do
-so using the [Parameter function](#the-parameter-function):
-
-```python
-from openapi_schema_pydantic.v3.v3_1_0.example import Example
-from starlite import get, Parameter
-
-from my_app.models import Version
-
-
-@get(path="/versions/{version:int}")
-def get_product_version(
- version: int = Parameter(
- ge=1,
- le=10,
- title="Available Product Versions",
- description="Get a specific specification version spec from the available specs",
- examples=[Example(value=1)],
- external_docs="https://mywebsite.com/documentation/product#versions",
- )
-) -> Version:
- ...
-```
-
-In the above example, `Parameter` is used to restrict the value of `version` to a range between 1 and 10, and then set
-the `title`,
-`description`, `examples` and `externalDocs` sections of the OpenAPI schema.
-
-## Query Parameters
-
-To define query parameters simply define them as kwargs in your function declaration:
-
-```python
-from datetime import datetime
-from typing import List, Optional
-
-from starlite import get
-
-from my_app.models import Order
-
-
-@get(path="/orders")
-def get_orders(
- page: int,
- brands: List[str],
- page_size: int = 10,
- from_date: Optional[datetime] = None,
- to_date: Optional[datetime] = None,
-) -> List[Order]:
- ...
-```
-
-The above is a rather classic example of a paginated "GET" request:
-
-1. _page_ is a required query parameter of type `int`. It has no default value and as such has to be provided or a
- ValidationException will be raised.
-2. _page_size_ is a required query parameter of type `int` as well, but it has a default value - so it can be omitted in
- the request.
-3. _brands_ is an optional list of strings with a default `None` value.
-4. _from_date_ and _to_date_ are optional date-time values that have a default `None` value.
-
-These parameters will be parsed from the function signature and used to generate a pydantic model. This model in turn
-will be used to validate the parameters and generate the OpenAPI schema.
-
-This means that you can also use any pydantic type in the signature, and it will follow the same kind of validation and
-parsing as you would get from pydantic.
-
-This works great, but what happens when the request is sent with a non-python naming scheme, such as _camelCase_? You
-could of course simply rename your variables accordingly:
-
-```python
-from datetime import datetime
-from typing import Optional, List
-
-from starlite import get
-
-from my_app.models import Order
-
-
-@get(path="/orders")
-def get_orders(
- page: int,
- brands: List[str],
- pageSize: int = 10,
- fromDate: Optional[datetime] = None,
- toDate: Optional[datetime] = None,
-) -> List[Order]:
- ...
-```
-
-This doesn't look so good, and tools such as PyLint will complain. The solution here is to
-use [the Parameter function](#the-parameter-function):
-
-```python
-from datetime import datetime
-from typing import Optional, List
-
-from starlite import get, Parameter
-
-from my_app.models import Order
-
-
-@get(path="/orders")
-def get_orders(
- page: int,
- page_size: int = Parameter(query="pageSize", gt=0, le=100),
- brands: List[str] = Parameter(min_items=2, max_items=5),
- from_Date: Optional[datetime] = Parameter(query="fromDate"),
- to_date: Optional[datetime] = Parameter(query="fromDate"),
-) -> List[Order]:
- ...
-```
-
-As you can see, specifying the "query" kwarg allows us to remap from one key to another. Furthermore, we can use
-Parameter for extended validation and documentation, as is done for `page_size`.
-
-## Header and Cookie Parameters
-
-Unlike _Query_ parameters, _Header_ and _Cookie_ parameters have to be declared
-using [the Parameter function](#the-parameter-function), for example:
-
-```python
-from pydantic import UUID4
-from starlite import get, Parameter
-
-from my_app.models import User
-
-
-@get(path="/users/{user_id:uuid}/")
-async def get_user(
- user_id: UUID4,
- token: str = Parameter(header="X-API-KEY"),
-) -> User:
- ...
-```
-
-OR
-
-```python
-from pydantic import UUID4
-from starlite import get, Parameter
-
-from my_app.models import User
-
-
-@get(path="/users/{user_id:uuid}/")
-async def get_user(
- user_id: UUID4,
- cookie: str = Parameter(cookie="my-cookie-param"),
-) -> User:
- ...
-```
-
-As you can see in the above, header parameters are declared using the `header` kwargs and cookie parameters using
-the `cookie` kwarg. Aside form this difference they work the same as query parameters.
-
-## The Parameter Function
-
-`Parameter` is a wrapper on top of the
-pydantic [Field function](https://pydantic-docs.helpmanual.io/usage/schema/#field-customization) that extends it with a
-set of Starlite specific kwargs. As such, you can use
-most of the kwargs of _Field_ with Parameter and have the same parsing and validation. The additional kwargs accepted
-by `Parameter` are passed to the resulting pydantic `FieldInfo` as an `extra`
-dictionary and have no effect on the working of pydantic itself.
-
-`Parameter` accepts the following optional kwargs:
-
-- `header`: The header parameter key for this parameter. A value for this kwarg is required for header parameters.
-- `cookie`: The cookie parameter key for this parameter. A value for this kwarg is required for cookie parameters.
-- `query`: The query parameter key for this parameter.
-- `examples`: A list of `Example` models.
-- `external_docs`: A url pointing at external documentation for the given parameter.
-- `content_encoding`: The content encoding of the value. Applicable on to string values.
- See [OpenAPI 3.1 for details](https://spec.openapis.org/oas/latest.html#schema-object).
-- `required`: A boolean flag dictating whether this parameter is required. If set to `False`, None values will be
- allowed. Defaults to `True`.
-- `default`: A default value. If `const` is true, this value is required.
-- `title`: String value used in the `title` section of the OpenAPI schema for the given parameter.
-- `description`: String value used in the `description` section of the OpenAPI schema for the given parameter.
-- `const`: A boolean flag dictating whether this parameter is a constant. If `True`, the value passed to the parameter
- must equal its `default` value. This also causes the OpenAPI `const` field to be populated with the `default` value.
-- `gt`: Constrict value to be _greater than_ a given float or int. Equivalent to `exclusiveMinimum` in the OpenAPI
- specification.
-- `ge`: Constrict value to be _greater or equal to_ a given float or int. Equivalent to `minimum` in the OpenAPI
- specification.
-- `lt`: Constrict value to be _less than_ a given float or int. Equivalent to `exclusiveMaximum` in the OpenAPI
- specification.
-- `le`: Constrict value to be _less or equal to_ a given float or int. Equivalent to `maximum` in the OpenAPI
- specification.
-- `multiple_of`: Constrict value to a multiple of a given float or int. Equivalent to `multipleOf` in the OpenAPI
- specification.
-- `min_items`: Constrict a set or a list to have a minimum number of items. Equivalent to `minItems` in the OpenAPI
- specification.
-- `max_items`: Constrict a set or a list to have a maximum number of items. Equivalent to `maxItems` in the OpenAPI
- specification.
-- `min_length`: Constrict a string or bytes value to have a minimum length. Equivalent to `minLength` in the OpenAPI
- specification.
-- `max_length`: Constrict a string or bytes value to have a maximum length. Equivalent to `maxLength` in the OpenAPI
- specification.
-- `regex`: A string representing a regex against which the given string will be matched. Equivalent to `pattern` in the
- OpenAPI specification.
-
-## Layered Parameters
-
-Starlite has a "layered" architecture, which is also evident in that one can declare parameters not only in individual
-route handlers - as in the above example, but on different layers of the application:
-
-```python
-from starlite import Starlite, Controller, Router, Parameter, get
-
-
-class MyController(Controller):
- path = "/controller"
- parameters = {
- "controller_param": Parameter(int, lt=100),
- }
-
- @get("/{path_param:int}")
- def my_handler(
- self,
- path_param: int,
- local_param: str,
- router_param: str,
- controller_param: int = Parameter(int, lt=50),
- ) -> dict:
- ...
-
-
-router = Router(
- path="/router",
- route_handlers=[MyController],
- parameters={
- "router_param": Parameter(
- str, regex="^[a-zA-Z]$", header="MyHeader", required=False
- ),
- },
-)
-
-app = Starlite(
- route_handlers=[router],
- parameters={
- "app_param": Parameter(str, cookie="special-cookie"),
- },
-)
-```
-
-In the above we declare parameters on the app, router and controller levels in addition to those declared in the route
-handler. Lets look at these closer:
-
-`app_param` is a cookie param with the key `special-cookie`. We type it as `str` by passing this as a arg to
-the `Parameter` function. This is required for us to get typing in the OpenAPI docs. Additionally, this parameter is
-assumed to be required because it is not explicitly declared as `required=False`. This is important because the route
-handler function does not declare a parameter called `app_param` at all, but it will still require this param to be sent
-as part of the request of validation will fail.
-
-`router_param` is a header param with the key `MyHeader`. Because its declared as `required=False`, it will not fail
-validation if not present unless explicitly declared by a route handler - and in this case it is. Thus it is actually
-required for the router handler function that declares it as an `str` and not an `Optional[str]`. If a string value is
-provided, it will be tested against the provided regex.
-
-`controller_param` is a query param with the key `controller_param`. It has an `lt=100` defined on the controller, which
-means the provided value must be less than 100. Yet the route handler re-declares it with an `lt=50`, which means for the
-route handler this value must be less than 50.
-
-Finally `local_param` is a route handler local query parameter, and `path_param` is a path parameter.
-
-**Note**: You cannot declare path parameters in different application layers. The reason for this is to ensure
-simplicity - otherwise parameter resolution becomes very difficult to do correctly.
diff --git a/docs/usage/3-parameters/0-path-parameters.md b/docs/usage/3-parameters/0-path-parameters.md
new file mode 100644
index 0000000000..66a2075ac2
--- /dev/null
+++ b/docs/usage/3-parameters/0-path-parameters.md
@@ -0,0 +1,101 @@
+# Path Parameters
+
+Path parameters are parameters declared as part of the `path` component of the URL. They are declared using a simple
+syntax `{param_name:param_type}`:
+
+```python
+from starlite import get
+from pydantic import BaseModel
+
+
+class User(BaseModel):
+ ...
+
+
+@get("/user/{user_id:int}")
+def get_user(user_id: int) -> User:
+ ...
+```
+
+In the above there are two components:
+
+1. The path parameter is defined in the `path` parameter passed the `@get` decorator in the. The parameter has a
+ declared type - which is required.
+2. The decorated function `get_user` defines a parameter with the same name as the parameter defined in the `path`
+ kwarg.
+
+The correlation of parameter name ensures that the value of the path parameter will be injected into the function when
+it's called.
+
+## Supported Path Parameter Types
+
+Currently the following types are supported: `int`, `float`, `str`, `uuid`.
+
+The types declared in the path parameter and the function do not need to match 1:1 - as long as parameter inside the
+function declaration is typed with a "higher" type to which the lower type can be coerced, this is fine. For example,
+consider this:
+
+```python
+from datetime import datetime
+from starlite import get
+from pydantic import BaseModel
+
+
+class Order(BaseModel):
+ ...
+
+
+@get(path="/orders/{from_date:int}")
+def get_orders(from_date: datetime) -> list[Order]:
+ ...
+```
+
+The parameter defined inside the `path` kwarg is typed as `int`, because the value passed as part of the request will be
+a timestamp in milliseconds without any decimals. The parameter in the function declaration though is typed
+as `datetime.datetime`. This works because the int value will be passed to a pydantic model representing the function
+signature, which will coerce the int into a datetime. Thus, when the function is called it will be called with a
+datetime typed parameter.
+
+
+!!! note
+ You only need to define the parameter in the function declaration if it's actually used inside the function. If the
+ path parameter is part of the path, but the function doesn't use it, its fine to omit it. It will still be validated
+ and added to the openapi schema correctly.
+
+## Extra Validation and Documentation for Path Params
+
+If you want to add validation or enhance the OpenAPI documentation generated for a given path parameter, you can do
+so using the [Parameter function](./3-the-parameter-function.md):
+
+```python
+from openapi_schema_pydantic.v3.v3_1_0.example import Example
+from openapi_schema_pydantic.v3.v3_1_0.external_documentation import (
+ ExternalDocumentation,
+)
+from starlite import get, Parameter
+from pydantic import BaseModel, conint, Json
+
+
+class Version(BaseModel):
+ id: conint(ge=1, le=10)
+ specs: Json
+
+
+@get(path="/versions/{version:int}")
+def get_product_version(
+ version: int = Parameter(
+ ge=1,
+ le=10,
+ title="Available Product Versions",
+ description="Get a specific version spec from the available specs",
+ examples=[Example(value=1)],
+ external_docs=ExternalDocumentation(
+ url="https://mywebsite.com/documentation/product#versions"
+ ),
+ )
+) -> Version:
+ ...
+```
+
+In the above example, `Parameter` is used to restrict the value of `version` to a range between 1 and 10, and then set
+the `title`,`description`, `examples` and `externalDocs` sections of the OpenAPI schema.
diff --git a/docs/usage/3-parameters/1-query-parameters.md b/docs/usage/3-parameters/1-query-parameters.md
new file mode 100644
index 0000000000..ef2d2238e0
--- /dev/null
+++ b/docs/usage/3-parameters/1-query-parameters.md
@@ -0,0 +1,96 @@
+# Query Parameters
+
+To define query parameters simply define them as kwargs in your function declaration:
+
+```python
+from datetime import datetime
+from typing import Optional
+
+from starlite import get
+from pydantic import BaseModel
+
+
+class Order(BaseModel):
+ ...
+
+
+@get(path="/orders")
+def get_orders(
+ page: int,
+ brands: list[str],
+ page_size: int = 10,
+ from_date: Optional[datetime] = None,
+ to_date: Optional[datetime] = None,
+) -> list[Order]:
+ ...
+```
+
+The above is a rather classic example of a paginated "GET" request:
+
+1. _page_ is a required query parameter of type `int`. It has no default value and as such has to be provided or a
+ ValidationException will be raised.
+2. _page_size_ is a required query parameter of type `int` as well, but it has a default value - so it can be omitted in
+ the request.
+3. _brands_ is an optional list of strings with a default `None` value.
+4. _from_date_ and _to_date_ are optional date-time values that have a default `None` value.
+
+These parameters will be parsed from the function signature and used to generate a pydantic model. This model in turn
+will be used to validate the parameters and generate the OpenAPI schema.
+
+This means that you can also use any pydantic type in the signature, and it will follow the same kind of validation and
+parsing as you would get from pydantic.
+
+This works great, but what happens when the request is sent with a non-python naming scheme, such as _camelCase_? You
+could of course simply rename your variables accordingly:
+
+```python
+from datetime import datetime
+from typing import Optional
+
+from starlite import get
+from pydantic import BaseModel
+
+
+class Order(BaseModel):
+ ...
+
+
+@get(path="/orders")
+def get_orders(
+ page: int,
+ brands: list[str],
+ pageSize: int = 10,
+ fromDate: Optional[datetime] = None,
+ toDate: Optional[datetime] = None,
+) -> list[Order]:
+ ...
+```
+
+This doesn't look so good, and tools such as PyLint will complain. The solution here is to
+use [the Parameter function](./3-the-parameter-function.md):
+
+```python
+from datetime import datetime
+from typing import Optional
+
+from starlite import get, Parameter
+from pydantic import BaseModel
+
+
+class Order(BaseModel):
+ ...
+
+
+@get(path="/orders")
+def get_orders(
+ page: int,
+ page_size: int = Parameter(query="pageSize", gt=0, le=100),
+ brands: list[str] = Parameter(min_items=2, max_items=5),
+ from_Date: Optional[datetime] = Parameter(query="fromDate"),
+ to_date: Optional[datetime] = Parameter(query="fromDate"),
+) -> list[Order]:
+ ...
+```
+
+As you can see, specifying the "query" kwarg allows us to remap from one key to another. Furthermore, we can use
+Parameter for extended validation and documentation, as is done for `page_size`.
diff --git a/docs/usage/3-parameters/2-header-and-cookie-parameters.md b/docs/usage/3-parameters/2-header-and-cookie-parameters.md
new file mode 100644
index 0000000000..123908d394
--- /dev/null
+++ b/docs/usage/3-parameters/2-header-and-cookie-parameters.md
@@ -0,0 +1,26 @@
+# Header and Cookie Parameters
+
+Unlike _Query_ parameters, _Header_ and _Cookie_ parameters have to be declared using
+[the Parameter function](3-the-parameter-function.md), for example:
+
+```python
+from pydantic import UUID4
+from starlite import get, Parameter
+from pydantic import BaseModel
+
+
+class User(BaseModel):
+ ...
+
+
+@get(path="/users/{user_id:uuid}/")
+async def get_user(
+ user_id: UUID4,
+ token: str = Parameter(header="X-API-KEY"),
+ cookie: str = Parameter(cookie="my-cookie-param"),
+) -> User:
+ ...
+```
+
+As you can see in the above, header parameters are declared using the `header` kwargs and cookie parameters using
+the `cookie` kwarg. Aside form this difference they work the same as query parameters.
diff --git a/docs/usage/3-parameters/3-the-parameter-function.md b/docs/usage/3-parameters/3-the-parameter-function.md
new file mode 100644
index 0000000000..5f30760ab4
--- /dev/null
+++ b/docs/usage/3-parameters/3-the-parameter-function.md
@@ -0,0 +1,44 @@
+# The Parameter Function
+
+`Parameter` is a wrapper on top of the
+pydantic [Field function](https://pydantic-docs.helpmanual.io/usage/schema/#field-customization) that extends it with a
+set of Starlite specific kwargs. As such, you can use most of the kwargs of _Field_ with Parameter and have the same
+parsing and validation. The additional kwargs accepted by `Parameter` are passed to the resulting pydantic `FieldInfo`
+as an `extra`dictionary and have no effect on the working of pydantic itself.
+
+`Parameter` accepts the following optional kwargs:
+
+- `header`: The header parameter key for this parameter. A value for this kwarg is required for header parameters.
+- `cookie`: The cookie parameter key for this parameter. A value for this kwarg is required for cookie parameters.
+- `query`: The query parameter key for this parameter.
+- `examples`: A list of `Example` models.
+- `external_docs`: A url pointing at external documentation for the given parameter.
+- `content_encoding`: The content encoding of the value. Applicable on to string values.
+ See [OpenAPI 3.1 for details](https://spec.openapis.org/oas/latest.html#schema-object).
+- `required`: A boolean flag dictating whether this parameter is required. If set to `False`, None values will be
+ allowed. Defaults to `True`.
+- `default`: A default value. If `const` is true, this value is required.
+- `title`: String value used in the `title` section of the OpenAPI schema for the given parameter.
+- `description`: String value used in the `description` section of the OpenAPI schema for the given parameter.
+- `const`: A boolean flag dictating whether this parameter is a constant. If `True`, the value passed to the parameter
+ must equal its `default` value. This also causes the OpenAPI `const` field to be populated with the `default` value.
+- `gt`: Constrict value to be _greater than_ a given float or int. Equivalent to `exclusiveMinimum` in the OpenAPI
+ specification.
+- `ge`: Constrict value to be _greater or equal to_ a given float or int. Equivalent to `minimum` in the OpenAPI
+ specification.
+- `lt`: Constrict value to be _less than_ a given float or int. Equivalent to `exclusiveMaximum` in the OpenAPI
+ specification.
+- `le`: Constrict value to be _less or equal to_ a given float or int. Equivalent to `maximum` in the OpenAPI
+ specification.
+- `multiple_of`: Constrict value to a multiple of a given float or int. Equivalent to `multipleOf` in the OpenAPI
+ specification.
+- `min_items`: Constrict a set or a list to have a minimum number of items. Equivalent to `minItems` in the OpenAPI
+ specification.
+- `max_items`: Constrict a set or a list to have a maximum number of items. Equivalent to `maxItems` in the OpenAPI
+ specification.
+- `min_length`: Constrict a string or bytes value to have a minimum length. Equivalent to `minLength` in the OpenAPI
+ specification.
+- `max_length`: Constrict a string or bytes value to have a maximum length. Equivalent to `maxLength` in the OpenAPI
+ specification.
+- `regex`: A string representing a regex against which the given string will be matched. Equivalent to `pattern` in the
+ OpenAPI specification.
diff --git a/docs/usage/3-parameters/4-layered-parameters.md b/docs/usage/3-parameters/4-layered-parameters.md
new file mode 100644
index 0000000000..a05e0b8975
--- /dev/null
+++ b/docs/usage/3-parameters/4-layered-parameters.md
@@ -0,0 +1,69 @@
+# Layered Parameters
+
+As part of Starlite's "layered" architecture, you can declare parameters not only as part of individual route handler
+functions, but also on other layers of the application:
+
+```python
+from starlite import Starlite, Controller, Router, Parameter, get
+
+
+class MyController(Controller):
+ path = "/controller"
+ parameters = {
+ "controller_param": Parameter(int, lt=100),
+ }
+
+ @get("/{path_param:int}")
+ def my_handler(
+ self,
+ path_param: int,
+ local_param: str,
+ router_param: str,
+ controller_param: int = Parameter(int, lt=50),
+ ) -> dict:
+ ...
+
+
+router = Router(
+ path="/router",
+ route_handlers=[MyController],
+ parameters={
+ "router_param": Parameter(
+ str, regex="^[a-zA-Z]$", header="MyHeader", required=False
+ ),
+ },
+)
+
+app = Starlite(
+ route_handlers=[router],
+ parameters={
+ "app_param": Parameter(str, cookie="special-cookie"),
+ },
+)
+```
+
+In the above we declare parameters on the app, router and controller levels in addition to those declared in the route
+handler. Lets look at these closer.
+
+- `app_param` is a cookie param with the key `special-cookie`. We type it as `str` by passing this as a arg to
+ the `Parameter` function. This is required for us to get typing in the OpenAPI docs. Additionally, this parameter is
+ assumed to be required because it is not explicitly declared as `required=False`. This is important because the route
+ handler function does not declare a parameter called `app_param` at all, but it will still require this param to be
+ sent
+ as part of the request of validation will fail.
+
+- `router_param` is a header param with the key `MyHeader`. Because its declared as `required=False`, it will not fail
+ validation if not present unless explicitly declared by a route handler - and in this case it is. Thus it is actually
+ required for the router handler function that declares it as an `str` and not an `Optional[str]`. If a string value is
+ provided, it will be tested against the provided regex.
+
+- `controller_param` is a query param with the key `controller_param`. It has an `lt=100` defined on the controller,
+ which
+ means the provided value must be less than 100. Yet the route handler re-declares it with an `lt=50`, which means for
+ the route handler this value must be less than 50.
+
+- Finally `local_param` is a route handler local query parameter, and `path_param` is a path parameter.
+
+!!! note
+You cannot declare path parameters in different application layers. The reason for this is to ensure
+simplicity - otherwise parameter resolution becomes very difficult to do correctly.
diff --git a/docs/usage/4-request-body.md b/docs/usage/4-request-body.md
index 0e6cb32d08..d8c3672511 100644
--- a/docs/usage/4-request-body.md
+++ b/docs/usage/4-request-body.md
@@ -34,7 +34,7 @@ async def create_user(
...
```
-The `Body` function is very similar to the [Parameter function](3-parameters.md#the-parameter-function), and it receives the following
+The `Body` function is very similar to the [Parameter function](3-parameters/3-the-parameter-function.md#the-parameter-function), and it receives the following
kwargs:
- `media_type`: An instance of the `starlite.enums.RequestEncodingType` enum. Defaults to `RequestEncodingType.JSON`.
diff --git a/docs/usage/7-middleware.md b/docs/usage/7-middleware.md
index d0a7712b41..d934beff64 100644
--- a/docs/usage/7-middleware.md
+++ b/docs/usage/7-middleware.md
@@ -255,7 +255,7 @@ app = Starlite(
## Middlewares and Exceptions
When an exception is raised by a route handler or dependency and is then transformed into a response by
-an [exception handler](../17-exceptions#exception-handling), middlewares are still applied to it. The one limitation on
+an [exception handler](17-exceptions#exception-handling), middlewares are still applied to it. The one limitation on
this though are the two exceptions that can be raised by the ASGI router - `404 Not Found` and `405 Method Not Allowed`.
These exceptions are raised before them middleware stack is called, and are only handled by exceptions handlers defined
on the Starlite app instance itself. Thus if you need to modify the responses generated for these exceptions, you will
diff --git a/poetry.lock b/poetry.lock
index fb901b6f05..306d977a77 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -37,17 +37,17 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
name = "attrs"
-version = "21.4.0"
+version = "22.1.0"
description = "Classes Without Boilerplate"
category = "dev"
optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+python-versions = ">=3.5"
[package.extras]
-dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"]
+dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"]
docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
-tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"]
-tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"]
+tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "cloudpickle"]
+tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"]
[[package]]
name = "brotli"
@@ -202,7 +202,7 @@ typing-extensions = {version = "*", markers = "python_version < \"3.8\""}
[[package]]
name = "hypothesis"
-version = "6.53.0"
+version = "6.54.0"
description = "A library for property-based testing"
category = "dev"
optional = false
@@ -214,7 +214,7 @@ exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
sortedcontainers = ">=2.1.0,<3.0.0"
[package.extras]
-all = ["black (>=19.10b0)", "click (>=7.0)", "django (>=2.2)", "dpcontracts (>=0.4)", "lark-parser (>=0.6.5)", "libcst (>=0.3.16)", "numpy (>=1.9.0)", "pandas (>=1.0)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "importlib-metadata (>=3.6)", "backports.zoneinfo (>=0.2.1)", "tzdata (>=2022.1)"]
+all = ["django (>=2.2)", "black (>=19.10b0)", "click (>=7.0)", "dpcontracts (>=0.4)", "lark-parser (>=0.6.5)", "libcst (>=0.3.16)", "numpy (>=1.9.0)", "pandas (>=1.0)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "importlib-metadata (>=3.6)", "backports.zoneinfo (>=0.2.1)", "tzdata (>=2022.1)"]
cli = ["click (>=7.0)", "black (>=19.10b0)", "rich (>=9.0.0)"]
codemods = ["libcst (>=0.3.16)"]
dateutil = ["python-dateutil (>=1.4)"]
@@ -418,7 +418,7 @@ pydantic = ">=1.8.2"
[[package]]
name = "orjson"
-version = "3.7.8"
+version = "3.7.11"
description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy"
category = "main"
optional = false
@@ -863,7 +863,7 @@ standard = ["websockets (>=10.0)", "httptools (>=0.4.0)", "watchfiles (>=0.13)",
[[package]]
name = "virtualenv"
-version = "20.16.0"
+version = "20.16.2"
description = "Virtual Python Environment builder"
category = "dev"
optional = false
@@ -932,8 +932,8 @@ atomicwrites = [
{file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"},
]
attrs = [
- {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"},
- {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"},
+ {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"},
+ {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"},
]
brotli = [
{file = "Brotli-1.0.9-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:268fe94547ba25b58ebc724680609c8ee3e5a843202e9a381f6f9c5e8bdb5c70"},
@@ -1144,8 +1144,8 @@ h11 = [
{file = "h11-0.13.0.tar.gz", hash = "sha256:70813c1135087a248a4d38cc0e1a0181ffab2188141a93eaf567940c3957ff06"},
]
hypothesis = [
- {file = "hypothesis-6.53.0-py3-none-any.whl", hash = "sha256:9c2b073731010cc00bcf060e71bd8f9507f6fe8f6d173f454634d1b91c537412"},
- {file = "hypothesis-6.53.0.tar.gz", hash = "sha256:39f225530c28fe484a59c39839c8a2fb414f2ecfd4743f75d82f55e0f09268c0"},
+ {file = "hypothesis-6.54.0-py3-none-any.whl", hash = "sha256:505d44bd6b0cb5d8be8f89339ecdf0ac570dd036c3ae4ab38d64de63e01c9874"},
+ {file = "hypothesis-6.54.0.tar.gz", hash = "sha256:e330436b8a851692fda53215d26845dec86d2c7e6c6d84c242cf14f270ce2367"},
]
idna = [
{file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"},
@@ -1267,44 +1267,44 @@ openapi-schema-pydantic = [
{file = "openapi_schema_pydantic-1.2.4-py3-none-any.whl", hash = "sha256:a932ecc5dcbb308950282088956e94dea069c9823c84e507d64f6b622222098c"},
]
orjson = [
- {file = "orjson-3.7.8-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:5072cc230cc6323677f32213eefa950c42be4ed9087e57d5f1b1b6a96e0894b4"},
- {file = "orjson-3.7.8-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:5399bcdb7153568aff4a8ed6f493e166069f39fc0da4b3da3a5a1e3b7cd145fb"},
- {file = "orjson-3.7.8-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e65c1bb844d204a9f989754890f53c527ed65837ee79e0f6dca69e5240396c01"},
- {file = "orjson-3.7.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f64378b79001689dfc3b8125c7aa4020517dc24e33c1132bec94ab163a26881"},
- {file = "orjson-3.7.8-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:26ba426c51c3f2b648b0a75b8e2b1f4fec26d0af128bc2f697bdc203e367007e"},
- {file = "orjson-3.7.8-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:eabcdefcb00bff853701d3d8641cd8696b7024c4992058141a527e0bc5645d67"},
- {file = "orjson-3.7.8-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:394bed00b69fb817db2d297005bf5fcf5aeb5d758a68d90941a283b2f7004d37"},
- {file = "orjson-3.7.8-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:986285a21b7edb95175d9e836574456750d8d00167b1cc1f11d7c59ab89076a8"},
- {file = "orjson-3.7.8-cp310-none-win_amd64.whl", hash = "sha256:46717ec1ce7ac130c91c0b4eaae8408c3d9bf4b72063d8180f1aaae0c1d3d9d7"},
- {file = "orjson-3.7.8-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:d6683a19e75acb051d22951a785bb037d7405bf802c05e9d9fe86f13ec22180a"},
- {file = "orjson-3.7.8-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:789db74dad15b8d32536a26d74e6e58f73cdff75885ffcb1fb36d962700836dc"},
- {file = "orjson-3.7.8-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:ed3a8601bb2a54f7eb300231396bf2d7467e70ba1be001419a82f282214f94b0"},
- {file = "orjson-3.7.8-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e1d401c82fd0e02019616b002590b964b3456635272182727da1d02f13e06c5f"},
- {file = "orjson-3.7.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2a300123b828199ddf723a3372f8f8daed2fe967b6e4b1fdf3fede678f1ba3b"},
- {file = "orjson-3.7.8-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:876b578a6dac3cad624705dd9475a5642b8bcb46028aff767f722510bd826dda"},
- {file = "orjson-3.7.8-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:9595bf7705ca47b955f516a681b7ccc9da427b3575b0df59aa53d9e0dd4a5972"},
- {file = "orjson-3.7.8-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7550e3774eac80167c45f0ce30a008a55262c50f4ca4983200b0fa06c3361aaf"},
- {file = "orjson-3.7.8-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:192ba154fb67bcccd6c49e23fdfbee688313baa66547988c17d97c2bc45a0395"},
- {file = "orjson-3.7.8-cp37-none-win_amd64.whl", hash = "sha256:a165d5e32c1953b1559b0388be17d7f78c455f672d165b104449faceb1b1e284"},
- {file = "orjson-3.7.8-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:919bab03c3205ca3590fb2c33d8135738d3431376845062a9a2bbf6ee58c0731"},
- {file = "orjson-3.7.8-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:6410fe482e665a63032ab4f96d8ac5bfcac77eb890e4cef66833433925a27096"},
- {file = "orjson-3.7.8-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:664e2dd02c274b6163667bb51d9703c678273a8d73556cc73ef131d43d0cd4d5"},
- {file = "orjson-3.7.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4f42eface43b3d63246d3bdd39282669d329659c1568506e39a66f487f4804a"},
- {file = "orjson-3.7.8-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:75ef59b1f8d7100c073168915c4443b62731405058a18bc9cc0463a7af671273"},
- {file = "orjson-3.7.8-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:2c4a588c7f5ffde869f819f53cdc3116608bc4b02508efcc50a875959cc303ac"},
- {file = "orjson-3.7.8-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:86194db79d815e07ef69dc3fcc31dacd0441bcb79c7fb7e621c5817c1a713276"},
- {file = "orjson-3.7.8-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a69f35b963da53425807ff56730fa2a403a05fb50d0b610432499bc61ede8577"},
- {file = "orjson-3.7.8-cp38-none-win_amd64.whl", hash = "sha256:0d9bcf586e97ae57ade5c2a3f028f55a275ac4c81760481082926b1082ed536e"},
- {file = "orjson-3.7.8-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:13a74a8e07ff00c6cba289361445af1a79d7b84990515e5ab011d2da33cef7e4"},
- {file = "orjson-3.7.8-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:8af0acf061995baf631bff5169907002d2bc90058d7d8e1ae6eb73f13d2f5d23"},
- {file = "orjson-3.7.8-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1611f49bc8ddf5586d23f6676e5ce644ee6c64e269d9655ec3fbfcbdef5acbb"},
- {file = "orjson-3.7.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ef66e7c47e9531dfa3b3ffb791b548c84903570b0914b01acc5eeb56ff5bc33"},
- {file = "orjson-3.7.8-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:ea2e5b5b2833b3bcd7d5b0646faf20de29be2f699ad435863bf6d4e8f56e2544"},
- {file = "orjson-3.7.8-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:51f087aee048795d49e45edaa938c7bbf64e1337ca6238d576c4dae416a01fb2"},
- {file = "orjson-3.7.8-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:6cd9be3c05dff2e96d641cad68d0322be5bda56f4679a04f6491e3f81868958d"},
- {file = "orjson-3.7.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d46d1665c9bdf26d8fcf30069ac2e4e87e7ea54304989075c0d1f4d6b2fa59d3"},
- {file = "orjson-3.7.8-cp39-none-win_amd64.whl", hash = "sha256:7ba770178a07fcb7473d65a222c2416d17fbf0857bcb3825b09e62960f174784"},
- {file = "orjson-3.7.8.tar.gz", hash = "sha256:a2e824220245323bb3291bb10ccf2ba936ed0b14e5e4a6260a1d1ed048caf77e"},
+ {file = "orjson-3.7.11-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:51e00a59dd6486c40f395da07633718f50b85af414e1add751f007dde6248090"},
+ {file = "orjson-3.7.11-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:c84d096f800d8cf062f8f514bb89baa1f067259ad8f71889b1d204039c2e2dd7"},
+ {file = "orjson-3.7.11-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7051f5259aeef76492763a458d3d05efe820c0d20439aa3d3396b427fb40f85d"},
+ {file = "orjson-3.7.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd5b9ed454bf5237ad4bb0ec2170329a9a74dab065eaf2a2c31b84a7eff96c72"},
+ {file = "orjson-3.7.11-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:3f8c767331039e4e12324a6af41d3538c503503bdf107f40d4e292bb5542ff90"},
+ {file = "orjson-3.7.11-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:fd9508534ae29b368a60deb7668a65801869bc96635ee64550b7c119205984c0"},
+ {file = "orjson-3.7.11-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:7168059c4a02f3cbe2ce3a26908e199e38fe55feb325ee7484c61f15719ec85e"},
+ {file = "orjson-3.7.11-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:87ab1b07ec863d870e8b2abcbae4da62aae2aed3a5119938a4b6309aa94ec973"},
+ {file = "orjson-3.7.11-cp310-none-win_amd64.whl", hash = "sha256:01863ff99f67afdb1a3a6a777d2de5a81f9b8203db70ef450b25363e7db48442"},
+ {file = "orjson-3.7.11-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a7962f2fb550a11f3e785c0aabfde6c2e7f823995f9d2d71f759708c6117a902"},
+ {file = "orjson-3.7.11-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:4d33d13b0521ddca84b58c9a75c18e854b79480a6a13e6d0c105cfc0d4e8b2a7"},
+ {file = "orjson-3.7.11-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:b62b758b220f5deb6c90381baed8afec5d9b72e916886d73e944b78be3524f39"},
+ {file = "orjson-3.7.11-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9390a69422ec12264bf76469c1cbd006a8672a552e7cc393664c66011343da71"},
+ {file = "orjson-3.7.11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a48e232130437fdbfc6c025cbf8aaac92c13ba1d9f7bd4445e177aae2f282028"},
+ {file = "orjson-3.7.11-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:da1637f98a5e2ac6fe1a722f990474fbf05ca15a21f8bfbc2d06a14c62f74bfa"},
+ {file = "orjson-3.7.11-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:c2f52563dcb0c500f9c9a028459950e1d14b66f504f8e5cdb50122a2538b38b0"},
+ {file = "orjson-3.7.11-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:fbebb207a9d104efbd5e1b3e7dc3b63723ebbcd73f589f01bc7466b36c185e51"},
+ {file = "orjson-3.7.11-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:18026b1b1a0c78e277b07230e2713af79ec4b9a8225a778983fd2f8455ae0e09"},
+ {file = "orjson-3.7.11-cp37-none-win_amd64.whl", hash = "sha256:77dff65c25dffea9e7dd9d41d3b55248dad2f6bf622d89e8ebb19a76780f9cd7"},
+ {file = "orjson-3.7.11-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:f76e9d7a0c1a586999094bbfbed5c17246dc217ffea061356b7056d3805b31b8"},
+ {file = "orjson-3.7.11-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:0479adf8c7f18ba52ce30b64a03de2f1facb85b7a620832a0c8d5e01326f32bd"},
+ {file = "orjson-3.7.11-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:113add34e29ef4a0f8538d67dc4992a950a7b4f49e556525cd8247c82a3d3f6c"},
+ {file = "orjson-3.7.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49cc542d3d2105fb7fb90a445ebe68f38cd846e6d86ea2c6e8724afbb9f052fc"},
+ {file = "orjson-3.7.11-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:42e41ceda915e1602c0c8f5b00b0f852c8c0bb2f9262138e13bf02128de8a0b7"},
+ {file = "orjson-3.7.11-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:df7f9b5d8c35e59c7df137587ebad2ec1d54947bbc6c7b1c4e7083c7012e3bba"},
+ {file = "orjson-3.7.11-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:17b77c2155da5186c18e3fe2ed5dc0d6babde5758fae81934a0a348c26430849"},
+ {file = "orjson-3.7.11-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c7fcbfc44a7fd94f55652e6705e03271c43b2a171220ee31d6447721b690acd9"},
+ {file = "orjson-3.7.11-cp38-none-win_amd64.whl", hash = "sha256:78177a47c186cd6188e624477cbaf91c941a03047afe8b8816091495bc6481ce"},
+ {file = "orjson-3.7.11-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:3a5324f0da7b15df64b6b586608af503c7fa8b0cfb6e2b9f4f4fdc4855af6978"},
+ {file = "orjson-3.7.11-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:5c063c9777b5f795b9d59ba8d58b44548e3f2e9a00a9e3ddddb8145d9eb57b68"},
+ {file = "orjson-3.7.11-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cf99de2f61fb8014a755640f9e2768890baf9aa1365742ccc3b9e6a19f528b16"},
+ {file = "orjson-3.7.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:71bc8155a08239a655d4cf821f106a0821d4eb566f7c7a0163ccc41763488116"},
+ {file = "orjson-3.7.11-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:02a4875acb6e5f6109c40f7b9e27313bbe67f2c3e4d5ea01390ae9399061d913"},
+ {file = "orjson-3.7.11-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:6fc774923377e8594bf54291854919155e3c785081e95efc6cfcc9d76657a906"},
+ {file = "orjson-3.7.11-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:01c77aab9ed881cc4322aca6ca3c534473f5334e5211b8dbb8622769595439ce"},
+ {file = "orjson-3.7.11-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ee69490145cc7d338a376a342415bba2f0c4d219f213c23fb64948cc40d9f255"},
+ {file = "orjson-3.7.11-cp39-none-win_amd64.whl", hash = "sha256:145367654c236127f59894025a5354bce124bd6ee1d5417c28635969b7628482"},
+ {file = "orjson-3.7.11.tar.gz", hash = "sha256:b4e6517861a397d9a1c72e7f8e8c72d6baf96d732a64637fb090ea49ead6042c"},
]
packaging = [
{file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"},
@@ -1562,8 +1562,8 @@ uvicorn = [
{file = "uvicorn-0.18.2.tar.gz", hash = "sha256:cade07c403c397f9fe275492a48c1b869efd175d5d8a692df649e6e7e2ed8f4e"},
]
virtualenv = [
- {file = "virtualenv-20.16.0-py2.py3-none-any.whl", hash = "sha256:2202dbc33c4f9aaa13289d244d64f2ade8b0169e88d0213b505099b384c5ae04"},
- {file = "virtualenv-20.16.0.tar.gz", hash = "sha256:6cfedd21e7584124a1d1e8f3b6e74c0bf8aeea44d9884b6d2d7241de5361a73c"},
+ {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"},
+ {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"},
]
watchdog = [
{file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330"},
diff --git a/pyproject.toml b/pyproject.toml
index 36a7b78d03..4a18d1282f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "starlite"
-version = "1.7.2"
+version = "1.7.3"
description = "Light-weight and flexible ASGI API Framework"
authors = ["Na'aman Hirschfeld "]
maintainers = ["Na'aman Hirschfeld ", "Peter Schutt ", "Cody Fincher "]