Light, Flexible and Extensible ASGI API framework

Overview

Starlite logo

PyPI - License PyPI - Python Version Discord Quality Gate Status Coverage Bugs Technical Debt Vulnerabilities Maintainability Rating Reliability Rating Security Rating

Starlite

Starlite is a light, opinionated and flexible ASGI API framework built on top of pydantic and Starlette.

Check out the Starlite documentation.

Installation

Using your package manager of choice:

pip install starlite

OR

poetry add starlite

OR

pipenv install starlite

Minimal Example

Define your data model using pydantic or any library based on it (see for example ormar, beanie, SQLModel etc.):

from pydantic import BaseModel, UUID4


class User(BaseModel):
    first_name: str
    last_name: str
    id: UUID4

You can alternatively use a dataclass, either the standard library one or the one from pydantic:

from uuid import UUID

# from pydantic.dataclasses import dataclass
from dataclasses import dataclass

@dataclass
class User:
    first_name: str
    last_name: str
    id: UUID

Define a Controller for your data model:

User: ... @get() async def get_users(self) -> list[User]: ... @patch(path="/{user_id:uuid}") async def partial_update_user(self, user_id: UUID4, data: Partial[User]) -> User: ... @put(path="/{user_id:uuid}") async def update_user(self, user_id: UUID4, data: list[User]) -> list[User]: ... @get(path="/{user_id:uuid}") async def get_user_by_id(self, user_id: UUID4) -> User: ... @delete(path="/{user_id:uuid}") async def delete_user_by_id(self, user_id: UUID4) -> User: ... ">
from pydantic import UUID4
from starlite.controller import Controller
from starlite.handlers import get, post, put, patch, delete
from starlite.types import Partial

from my_app.models import User


class UserController(Controller):
    path = "/users"

    @post()
    async def create(self, data: User) -> User:
        ...

    @get()
    async def get_users(self) -> list[User]:
        ...

    @patch(path="/{user_id:uuid}")
    async def partial_update_user(self, user_id: UUID4, data: Partial[User]) -> User:
        ...

    @put(path="/{user_id:uuid}")
    async def update_user(self, user_id: UUID4, data: list[User]) -> list[User]:
        ...

    @get(path="/{user_id:uuid}")
    async def get_user_by_id(self, user_id: UUID4) -> User:
        ...

    @delete(path="/{user_id:uuid}")
    async def delete_user_by_id(self, user_id: UUID4) -> User:
        ...

Import your controller into your application's entry-point and pass it to Starlite when instantiating your app:

from starlite import Starlite

from my_app.controllers.user import UserController

app = Starlite(route_handlers=[UserController])

To run you application, use an ASGI server such as uvicorn:

uvicorn my_app.main:app --reload

Project and Roadmap

This project builds on top the Starlette ASGI toolkit and pydantic modelling to create a higher-order opinionated framework. The idea to use these two libraries as a basis is of course not new - it was first done in FastAPI, which in this regard (and some others) was a source of inspiration for this framework. Nonetheless, Starlite is not FastAPI - it has a different design, different project goals and a completely different codebase.

  1. The goal of this project is to become a community driven project. That is, not to have a single "owner" but rather a core team of maintainers that leads the project, as well as community contributors.
  2. Starlite draws inspiration from NestJS - a contemporary TypeScript framework - which places opinions and patterns at its core. As such, the design of the API breaks from the Starlette design and instead offers an opinionated alternative.
  3. Finally, Python OOP is extremely powerful and versatile. While still allowing for function based endpoints, Starlite seeks to build on this by placing class based Controllers at its core.

Features and roadmap:

  • sync and async API endpoints
  • fast json serialization using orjson
  • class based controllers
  • decorators based configuration
  • rigorous typing and type inference
  • layered dependency injection
  • automatic OpenAPI schema generation
  • support for pydantic models and pydantic dataclasses
  • support for vanilla python dataclasses
  • extended testing support
  • built-in Redoc based OpenAPI UI
  • route guards
  • detailed documentation
  • schemathesis integration

Contributing

Starlite is open to contributions big and small. You can always join our discord server to discuss contributions and project maintenance. For guidelines on how to contribute, please see the contribution guide.

Comments
  • Middleware are not executed on Starlite error

    Middleware are not executed on Starlite error

    When route is not found, method is not allowed, or some similar error, then middleware are not executed although and it is unexpected behaviour.

    Starlite, second test fails:

    from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint
    from starlette.requests import Request
    from starlette.responses import Response
    from starlite import Starlite, TestClient, get
    
    
    class ServerHeaderMiddleware(BaseHTTPMiddleware):
        async def dispatch(
            self, request: Request, call_next: RequestResponseEndpoint
        ) -> Response:
            response = await call_next(request)
            response.headers["Server"] = "NULL"
            return response
    
    
    @get()
    async def route() -> str:
        return ""
    
    
    app = Starlite(
        debug=True,
        route_handlers=[route],
        middleware=[ServerHeaderMiddleware],
    )
    
    
    def test_middleware_is_executed_when_route_found():
        with TestClient(app) as client:
            response = client.get("/")
            assert response.headers["Server"] == "NULL"
    
    
    def test_middleware_is_executed_when_route_not_found():
        with TestClient(app) as client:
            response = client.get("/non-existing-route")
            assert response.headers["Server"] == "NULL"
    

    Starlette, tests pass:

    from starlette.applications import Starlette
    from starlette.middleware import Middleware
    from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint
    from starlette.requests import Request
    from starlette.responses import PlainTextResponse, Response
    from starlette.routing import Route
    from starlette.testclient import TestClient
    
    
    class ServerHeaderMiddleware(BaseHTTPMiddleware):
        async def dispatch(
            self, request: Request, call_next: RequestResponseEndpoint
        ) -> Response:
            response = await call_next(request)
            response.headers["Server"] = "NULL"
            return response
    
    
    async def route(request: Request):
        return PlainTextResponse("")
    
    
    app = Starlette(
        debug=True,
        routes=[Route("/", route, methods=["GET"])],
        middleware=[Middleware(ServerHeaderMiddleware)],
    )
    
    
    def test_middleware_is_executed_when_route_found():
        with TestClient(app) as client:
            response = client.get("/")
            assert response.headers["Server"] == "NULL"
    
    
    def test_middleware_is_executed_when_route_not_found():
        with TestClient(app) as client:
            response = client.get("/non-existing-route")
            assert response.headers["Server"] == "NULL"
    
    bug 
    opened by vrslev 66
  • Enhancement: Rich and StructLog integration

    Enhancement: Rich and StructLog integration

    Create a documented example and/or integration to allow for rich traceback handling and logging handler.

    Here's an example using the LoggingHandler

    https://rich.readthedocs.io/en/latest/logging.html

    enhancement help wanted good first issue 
    opened by cofin 38
  • Issue #177: Add a baseline for Rust path resolution bindings

    Issue #177: Add a baseline for Rust path resolution bindings

    Addresses #177.

    Baseline implementation very closely mimics the original Python trie implementation for path resolution, but uses Rust types for native performance.

    A native extension wheel can be built using maturin build in a Poetry shell, which will output to ./target/wheels, but the packaging of the wheels into the Starlite package has not been done. I think this should be doable by calling a build script from Poetry and including the wheels somehow, if it is not otherwise possible to directly include the wheel directory's wheels.

    The native extension has to be built with maturin develop before running pytest in order to run tests locally.

    opened by nramos0 29
  • Enhancement: Server-side sessions

    Enhancement: Server-side sessions

    What's the feature you'd like to ask for. Currently only cookie-based (i.e. client-side) sessions are supported. A server-side session with a redis/memcached/file backend would be nice to have.

    If that's something starlite wants to support, I'd be happy to work on it.

    enhancement 
    opened by provinzkraut 28
  • POC for controlled development environment and usage instructions.

    POC for controlled development environment and usage instructions.

    To try to clear the path for contributors it would be good to have a specific workflow that we use. We could even use tox inside CI so that there would be virtually no difference between running the tests locally and in CI.

    Basic workflow is:

    • developer ensures they have the versions of python available - there are instructions on how to use pyenv for this in CONTRIBUTING.md
    • developer uses poetry to install Starlite and required extras, poetry install --extras "test lint dev" (I want to collapse this down topoetry install --extras dev` but I'm having trouble with circular dependencies, which apparently should be supported: https://discuss.python.org/t/pyproject-toml-optional-dependencies-redundancy-aka-dry-extras/8428/5).
    • everything should work as expected from then on, and we'll have poetry run tox which will run tests across all python versions and linting.
    opened by peterschutt 28
  • Enhancement: Replace Starlette Responses

    Enhancement: Replace Starlette Responses

    PR Checklist

    • [x] Have you followed the guidelines in CONTRIBUTING.md?
    • [x] Have you got 100% test coverage on new code?
    • [x] Have you updated the prose documentation?
    • [x] Have you updated the reference documentation?

    This PR removes the usage of Starlette based Response objects by introducing our own version - with a compatible API.

    Relates to #612

    enhancement starlette-migration 
    opened by Goldziher 27
  • Enhancement: Allow disabling openapi documentation sites and schema download endpoints via config

    Enhancement: Allow disabling openapi documentation sites and schema download endpoints via config

    Currently the OpenAPIController always exposes redoc, swagger-ui and stoplight elements static sites, and a yaml + json schema download endpoints. This though might not be desirable.

    Tasks:

    1. add a new method on the controller called render_404_not_found or something such like, which renders a simple 404 page.
    2. add a configuration option to the OpenAPIConfig class that determines which endpoints are enabled. For example, a list or set of literal identifiers - which by default includes all values.
    3. add logic to return a 404 if a particular endpoint is not enabled in the config.

    Note:

    Access the app level config is possble using the request instance. See how this is currently implemented in the OpenAPIController.root method as an example.

    enhancement help wanted good first issue 
    opened by Goldziher 27
  • Question: How to mount an app instance?

    Question: How to mount an app instance?

    Is this possible? If not could it be :)

    admin_app = Starlette(
        routes=[
            Route("/", ...),
        ],
        middleware=[
            Middleware(MiddlewareA),
            ),
        ],
    )
    
    app = Starlette(
        routes=[
            Route("/", ...),
            Mount("/admin/", admin_app),
        ],
        middleware=[
            Middleware(Middlewareb),
        ],
    )
    
    question 
    opened by mybigman 26
  • Enhancement: Rust, C or C++ bindings for path resolution

    Enhancement: Rust, C or C++ bindings for path resolution

    Starlite currently resolves paths using a tree structure, but in python. This is quite slow. It would be very helpful if we could create custom bindings in a low level and substantially faster language to implement the tree and its required parsing methods.

    The data structure that is often used for this purpose is called a "radix prefix tree". This is not necessarily the only option we have - but its a strong one.

    PRs are welcome, as are discussions.

    enhancement help wanted 
    opened by Goldziher 25
  • Import testing dynamically, install requests as extra dependency

    Import testing dynamically, install requests as extra dependency

    Closes #130

    >>> from starlite import Starlite
    >>> Starlite
    <class 'starlite.app.Starlite'>
    >>> from starlite import TestClient
    Traceback (most recent call last):
        ...
    MissingDependencyException: To use starlite.testing, install starlite with 'testing' extra, e.g. `pip install starlite[testing]`
    
    opened by Bobronium 25
  • Enhancement: OpenTelemetry integration

    Enhancement: OpenTelemetry integration

    So, as the title says. We need to consider how to best support OpenTelemetry. We might need to add some hooks to allow for optimal instrumentation. We should also consider creating an OT instrumentationn library, see for example: https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/fastapi/fastapi.html

    enhancement help wanted good first issue 
    opened by Goldziher 22
  • Migrate the

    Migrate the "Usage Guidelines" section from MkDocs to Sphinx

    This is a draft PR which introduces the starting phase of the documentations overhaul. It includes migrating the "Usage Guidelines" of the existing documentations to its Sphinx version.

    PR Checklist

    • [x] Have you followed the guidelines in CONTRIBUTING.md?
    • [ ] Have you got 100% test coverage on new code?
    • [x] Have you updated the prose documentation?
    • [ ] Have you updated the reference documentation?
    opened by Jarmos-san 0
  • Bug: Using router with starlite raise exception

    Bug: Using router with starlite raise exception

    Hello,

    image

    Can anyone tell me why this(starlite instance route register) was called twice, It creates a bug with Router because of

    if isinstance(value, Router):
        if value.owner:
            raise ImproperlyConfiguredException(f"Router with path {value.path} has already been registered")
    
    bug triage required 
    opened by tsiresymila1 4
  • 1035 enhancement openapi 31 typescript generators

    1035 enhancement openapi 31 typescript generators

    PR Checklist

    • [ ] Have you followed the guidelines in CONTRIBUTING.md?
    • [ ] Have you got 100% test coverage on new code?
    • [ ] Have you updated the prose documentation?
    • [ ] Have you updated the reference documentation?
    opened by Goldziher 3
  • Sphinx migration

    Sphinx migration

    Migrate docs to Sphinx. This is work in progress.

    Todo:

    • [ ] Migrate API documentation to autodoc
    • [ ] Convert pymdownx markdown extension to rst equivalents
    • [ ] Convert markdown files to rst if needed

    PR Checklist

    • [ ] Have you followed the guidelines in CONTRIBUTING.md?
    • [ ] Have you got 100% test coverage on new code?
    • [ ] Have you updated the prose documentation?
    • [ ] Have you updated the reference documentation?
    opened by provinzkraut 3
  • v2 refactor: Remove deprecated features

    v2 refactor: Remove deprecated features

    As part of the v2 release, all deprecated functions, methods, classes, etc. should be removed and an upgrade path should be provided in the (yet to create) migration guide.

    This is a standing issue tracking current progress and cannot be considered done before the last 1.x release / 2.0 feature freeze.

    refactor v2 
    opened by provinzkraut 0
Releases(v1.48.1)
  • v1.48.1(Jan 3, 2023)

    What's Changed

    Bugfixes

    • Rename enc_hook -> default in encode_json by @ste-pool in https://github.com/starlite-api/starlite/pull/1009
    • Re-enable super() calls to Response.serializer by @provinzkraut in https://github.com/starlite-api/starlite/pull/1018

    Features

    • Extend serializable types by @provinzkraut in https://github.com/starlite-api/starlite/pull/1011
    • Support application factory pattern in CLI run command by @provinzkraut in https://github.com/starlite-api/starlite/pull/1023

    Docs

    • Fix typo in the docs (Testing. Test Client) by @spikenn in https://github.com/starlite-api/starlite/pull/1015
    • Fix a broken example for the "Response Headers" docs by @Jarmos-san in https://github.com/starlite-api/starlite/pull/1021
    • Revise template and middleware docs by @provinzkraut in https://github.com/starlite-api/starlite/pull/1012

    Other

    • Cleanup type encoders by @provinzkraut in https://github.com/starlite-api/starlite/pull/1014

    New Contributors

    • @spikenn made their first contribution in https://github.com/starlite-api/starlite/pull/1015
    • @Jarmos-san made their first contribution in https://github.com/starlite-api/starlite/pull/1021

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.48.0...v1.48.1

    Source code(tar.gz)
    Source code(zip)
  • v1.48.0(Dec 29, 2022)

    What's Changed

    • Add docs versioning by @provinzkraut in https://github.com/starlite-api/starlite/pull/996
    • Add support for layered type_encoders by @provinzkraut in https://github.com/starlite-api/starlite/pull/995
    • Fix rendering of Enum parameters in OpenAPI schema by @dialvarezs in https://github.com/starlite-api/starlite/pull/993
    • Fix sorting of tags in OpenAPI schema by @ste-pool in https://github.com/starlite-api/starlite/pull/1005
    • Fix swagger check for schema by @ste-pool in https://github.com/starlite-api/starlite/pull/1000

    New Contributors

    • @rgajason made their first contribution in https://github.com/starlite-api/starlite/pull/998

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.47.0...v1.48.0

    Source code(tar.gz)
    Source code(zip)
  • v1.47.0(Dec 26, 2022)

    What's Changed

    Bugfixes

    • Fix #992: Deprecate CookieBackendConfig import by @provinzkraut in https://github.com/starlite-api/starlite/pull/992

    New features

    • Auto generation of DTOs from response data by @Goldziher in https://github.com/starlite-api/starlite/pull/982
    • Media type inference to HTTP handlers by @Goldziher in https://github.com/starlite-api/starlite/pull/984
    • Support differently named path parameters on the same route by @Goldziher in https://github.com/starlite-api/starlite/pull/987

    Documentation

    • Update docs for #982 by @dialvarezs in https://github.com/starlite-api/starlite/pull/985

    Other

    • Add fast-query-parsers by @Goldziher in https://github.com/starlite-api/starlite/pull/989

    New Contributors

    • @dialvarezs made their first contribution in https://github.com/starlite-api/starlite/pull/985

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.46.0...v1.47.0

    Source code(tar.gz)
    Source code(zip)
  • v1.46.0(Dec 23, 2022)

    What's Changed

    Bugfixes

    • Make SessionAuth openapi_schema use backend_config.key by @asomethings in https://github.com/starlite-api/starlite/pull/934
    • Support utf-8 encoded strings in form data by @NiclasHaderer in https://github.com/starlite-api/starlite/pull/946
    • Fix 964: Jinja Template response ignores MediaType settings by @provinzkraut in https://github.com/starlite-api/starlite/pull/970

    Changes

    • Move JinjaTemplateEngine and MakoTemplateEngine to contrib by @Goldziher in https://github.com/starlite-api/starlite/pull/949
    • Update template config by @Goldziher in https://github.com/starlite-api/starlite/pull/955

    New features

    • Support for controlling Pydantic models' alias in OpenAPI Schema by @Goldziher in https://github.com/starlite-api/starlite/pull/959
    • Support Cookie instances in Response.set_cookie by @provinzkraut in https://github.com/starlite-api/starlite/pull/969
    • CLI by @provinzkraut in https://github.com/starlite-api/starlite/pull/936

    Docs

    • Add: Autorun examples by @provinzkraut in https://github.com/starlite-api/starlite/pull/943
    • Add: Documentation for TestClient.portal() by @smithk86 in https://github.com/starlite-api/starlite/pull/932
    • Change: Updated documentation for Guards by @cofin in https://github.com/starlite-api/starlite/pull/942
    • Change: Restructure "The Starlite app" and "Custom responses" sections by @provinzkraut in https://github.com/starlite-api/starlite/pull/972
    • Change: Minor Readme update by @provinzkraut in https://github.com/starlite-api/starlite/pull/950
    • Change: Update migration guide, add framework feature comparison by @provinzkraut in https://github.com/starlite-api/starlite/pull/963
    • Fix: Fix note block spacing in cache usage by @garburator in https://github.com/starlite-api/starlite/pull/94
    • Fix: Fix missing colons in framework feature comparison by @asomethings in https://github.com/starlite-api/starlite/pull/968

    New Contributors

    • @asomethings made their first contribution in https://github.com/starlite-api/starlite/pull/934
    • @garburator made their first contribution in https://github.com/starlite-api/starlite/pull/944
    • @NiclasHaderer made their first contribution in https://github.com/starlite-api/starlite/pull/946

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.45.1...v1.46.0

    Source code(tar.gz)
    Source code(zip)
  • v1.45.1(Dec 13, 2022)

    What's Changed

    • Fix controller support for mixed websocket and http route handlers by @Goldziher in https://github.com/starlite-api/starlite/pull/930
    • Improve serialization of Pydantic-types by @provinzkraut in https://github.com/starlite-api/starlite/pull/929

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.45.0...v1.45.1

    Source code(tar.gz)
    Source code(zip)
  • v1.45.0(Dec 11, 2022)

    What's Changed

    • Add MessagePack support and serialization with msgspec by @provinzkraut in https://github.com/starlite-api/starlite/pull/891
    • Fix logger propagation causing duplicate messages in logging middleware by @Goldziher in https://github.com/starlite-api/starlite/pull/923
    • Fix mounted starlette apps require paths ending with slashes by @Goldziher in https://github.com/starlite-api/starlite/pull/925
    • Fix OpenAPI spec generation for dynamic route handlers by @Goldziher in https://github.com/starlite-api/starlite/pull/917
    • Fix OpenAPI support for custom responses with generic types by @Goldziher in https://github.com/starlite-api/starlite/pull/918
    • Fix rate-limiting middleware handling of mount paths by @Goldziher in https://github.com/starlite-api/starlite/pull/922
    • Fix TestClient handling of escaped ampersands in query params by @Goldziher in https://github.com/starlite-api/starlite/pull/919

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.44.0...v1.45.0

    Source code(tar.gz)
    Source code(zip)
  • v1.44.0(Dec 5, 2022)

    What's Changed

    • Update urlencoded parsing by @Goldziher in https://github.com/starlite-api/starlite/pull/901
    • Fix generator based dependencies with cached responses by @provinzkraut in https://github.com/starlite-api/starlite/pull/902
    • Fix OpenAPIController when ASGI root_path is set by @smithk86 in https://github.com/starlite-api/starlite/pull/905
    • Add a new multipart parser by @Goldziher in https://github.com/starlite-api/starlite/pull/901
    • Add support for pagination by @Goldziher in https://github.com/starlite-api/starlite/pull/908

    New Contributors

    • @Alc-Alc made their first contribution in https://github.com/starlite-api/starlite/pull/906

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.43.1...v1.44.0

    Source code(tar.gz)
    Source code(zip)
  • v1.43.1(Nov 30, 2022)

    What's Changed

    Bugfixes

    • Swap StructLoggingConfing.processor type hint to List by @ste-pool in https://github.com/starlite-api/starlite/pull/884
    • Honour documentation_only flag for cookies by @jtraub in https://github.com/starlite-api/starlite/pull/887
    • Fix cookie caching issues by @Goldziher in https://github.com/starlite-api/starlite/pull/889
    • Support legacy OpenAPI file upload format by @Goldziher in https://github.com/starlite-api/starlite/pull/892

    Documentation

    • Fix template callable example and security ref docs by @provinzkraut in https://github.com/starlite-api/starlite/pull/879

    New Contributors

    • @ste-pool made their first contribution in https://github.com/starlite-api/starlite/pull/884

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.43.0...v1.43.1

    Source code(tar.gz)
    Source code(zip)
  • v1.43.0(Nov 29, 2022)

    What's Changed

    New features

    • Add security module and JWT auth contrib by @Goldziher in https://github.com/starlite-api/starlite/pull/864. Read more about it here

    Changes

    • Deprecate delete_all of memcached session backend by @provinzkraut in https://github.com/starlite-api/starlite/pull/874

    Documentation

    • Cleanup of some examples in the docs by @provinzkraut in https://github.com/starlite-api/starlite/pull/798
    • Change navigation layout and intro sites by @provinzkraut in https://github.com/starlite-api/starlite/pull/873

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.42.0...v1.43.0

    Source code(tar.gz)
    Source code(zip)
  • v1.42.0(Nov 26, 2022)

    What's Changed

    New Features

    • Support different types of path parameters for different leaf nodes by @Goldziher in https://github.com/starlite-api/starlite/pull/853
    • Dependencies with yield by @provinzkraut in https://github.com/starlite-api/starlite/pull/856
    • Update custom state injection and add ImmutableState class by @Goldziher in https://github.com/starlite-api/starlite/pull/845

    Bugfixes

    • Fix #854 - Incorrect path resolution of 'path' type parameters by @Goldziher in https://github.com/starlite-api/starlite/pull/857
    • Fix #849 - Make LoggingMiddleware handle request bodies correctly by @provinzkraut in https://github.com/starlite-api/starlite/pull/860

    Internal changes

    • Rework dependencies (#815) by @ottermata in https://github.com/starlite-api/starlite/pull/815

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.41.0...v1.42.0

    Source code(tar.gz)
    Source code(zip)
  • v1.41.0(Nov 23, 2022)

    What's Changed

    • Fix #840 - Always commit changes properly after deleting session data by @provinzkraut in https://github.com/starlite-api/starlite/pull/843
    • Fix #841 - Change middleware.session.sqlalchemy_backend.SessionModelMixin.data to LargeBinary. by @provinzkraut in https://github.com/starlite-api/starlite/pull/842
    • Peformance Updates by @Goldziher in https://github.com/starlite-api/starlite/pull/833

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.40.1...v1.41.0

    Source code(tar.gz)
    Source code(zip)
  • v1.40.1(Nov 21, 2022)

    What's Changed

    • Fix headers parsing by @peterschutt in https://github.com/starlite-api/starlite/pull/832
    • Fix typo in opentelemetry extra by @ottermata in https://github.com/starlite-api/starlite/pull/835
    • fix: parsing of sequence query for nested dependency. by @peterschutt in https://github.com/starlite-api/starlite/pull/838

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.40.0...v1.40.1

    Source code(tar.gz)
    Source code(zip)
  • v1.40.0(Nov 20, 2022)

    • Add: forward refs resolution to signature models. by @peterschutt in https://github.com/starlite-api/starlite/pull/806
    • Add: OpenTelemetry instrumentation contrib package by @Goldziher in https://github.com/starlite-api/starlite/pull/796
    • Breaking: remove per request caching of dependencies by @Goldziher in https://github.com/starlite-api/starlite/pull/805
    • Breaking: remove QueryMultiDict and replace with simple MultiDict by @Goldziher in https://github.com/starlite-api/starlite/pull/805
    • Breaking: replace Response.encoded_headers with Response.encode_headers by @Goldziher in https://github.com/starlite-api/starlite/pull/805
    • docs: add LonelyVikingMichael as a contributor for doc by @allcontributors in https://github.com/starlite-api/starlite/pull/812
    • Docs: add srikanthccv as a contributor for test, and doc by @allcontributors in https://github.com/starlite-api/starlite/pull/801
    • Docs: add sssssss340 as a contributor for bug by @allcontributors in https://github.com/starlite-api/starlite/pull/817
    • Docs: logging example by @LonelyVikingMichael in https://github.com/starlite-api/starlite/pull/810
    • Docs: update mounting docs and readme by @jtraub in https://github.com/starlite-api/starlite/pull/807
    • Fix: 404 where current trie node has handlers and child route has path param by @peterschutt in https://github.com/starlite-api/starlite/pull/818
    • Fix: flaky SQLA-session-backend tests by @provinzkraut in https://github.com/starlite-api/starlite/pull/797
    • refactor AllowedHosts and CompressionMiddleware by moving them application to handler level by @jtraub in https://github.com/starlite-api/starlite/pull/804
    • Update: request_factory.{_default_route_handler,default_app} to use deferred bootstrap by @peterschutt in https://github.com/starlite-api/starlite/pull/828
    • Update: handling of compressed "body" in logging middleware. by @peterschutt in https://github.com/starlite-api/starlite/pull/822
    • Update: OpenAPI schema generation to hide automatically created OPTIONS routes by @ottermata in https://github.com/starlite-api/starlite/pull/826
    • Update: refactor routing logic and parameter parsing to improve performance by @Goldziher in https://github.com/starlite-api/starlite/pull/805

    New Contributors

    • @LonelyVikingMichael made their first contribution in https://github.com/starlite-api/starlite/pull/810

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.39.0...v1.40.0

    Source code(tar.gz)
    Source code(zip)
  • v1.39.0(Nov 12, 2022)

    What's Changed

    • add CORS middleware and support for OPTIONS requests by @Goldziher in https://github.com/starlite-api/starlite/pull/792
    • add send_as_attachment flag to StaticFilesConfig by @provinzkraut in https://github.com/starlite-api/starlite/pull/785
    • add starlette URL, URLPath and Address datastructures by @provinzkraut in https://github.com/starlite-api/starlite/pull/738
    • fix filename parameter for FileResponse in StaticFiles by @peterschutt in https://github.com/starlite-api/starlite/pull/775
    • fix handling of leading whitespaces OpenAPI generation of description from docstrings by @jtraub in https://github.com/starlite-api/starlite/pull/771
    • refactor builtin middlewares to use AbstractMiddleware by @jtraub in https://github.com/starlite-api/starlite/pull/778
    • update docstrings using pydocstyle by @provinzkraut in https://github.com/starlite-api/starlite/pull/777
    • updatecontent-disposition to inline when html_mode is set on StaticFilesConfig by @provinzkraut in https://github.com/starlite-api/starlite/pull/784

    Important

    • This version removes starlette as a dependency. See https://github.com/starlite-api/starlite/pull/773 and https://github.com/starlite-api/starlite/pull/792

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.38.0...v1.39.0

    Source code(tar.gz)
    Source code(zip)
  • v1.38.0(Nov 7, 2022)

    What's Changed

    • Fix links in docs, and small fixes. by @peterschutt in https://github.com/starlite-api/starlite/pull/757
    • Add 'AllowedHostsMiddleware' by @Goldziher in https://github.com/starlite-api/starlite/pull/758
    • Replace ServerErrorMiddleware with own exception printer by @jtraub in https://github.com/starlite-api/starlite/pull/696
    • Ensures path_params key always exists in scope. by @peterschutt in https://github.com/starlite-api/starlite/pull/760
    • Include file_system in StaticFiles docs by @cofin in https://github.com/starlite-api/starlite/pull/763
    • Fix resolving starlette responses by @Goldziher in https://github.com/starlite-api/starlite/pull/766
    • Add QueryMultiDict by @Goldziher in https://github.com/starlite-api/starlite/pull/759
    • Add *args override to Logger protocol by @cofin in https://github.com/starlite-api/starlite/pull/761

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.37.0...v1.38.0

    Source code(tar.gz)
    Source code(zip)
  • v1.37.0(Nov 5, 2022)

    What's Changed

    • add local implementation StaticFiles to replace Starlette and extend support to fsspec by @Goldziher in https://github.com/starlite-api/starlite/pull/739
    • add 'gzip' compression by @Goldziher in https://github.com/starlite-api/starlite/pull/751
    • remove Starlette Middleware type from typing by @Goldziher in https://github.com/starlite-api/starlite/pull/752
    • add head decorator by @Goldziher in https://github.com/starlite-api/starlite/pull/755

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.36.0...v1.37.0

    Source code(tar.gz)
    Source code(zip)
  • v1.36.0(Nov 4, 2022)

    What's Changed

    • Add layer for opt dictionary by @jtraub in https://github.com/starlite-api/starlite/pull/720
    • Replace starlettes Headers and MutableHeaders, move FormMultiDict to multidict by @provinzkraut in https://github.com/starlite-api/starlite/pull/732
    • Add AbstractMiddleware class. by @Goldziher in https://github.com/starlite-api/starlite/pull/729
    • Removes "method" from ResponseExtractorField. by @peterschutt in https://github.com/starlite-api/starlite/pull/741
    • Added per request caching of dependencies by @ottermata in https://github.com/starlite-api/starlite/pull/743
    • Resolve dependencies concurrently by @ottermata in https://github.com/starlite-api/starlite/pull/744
    • Fix asgi/websocket handlers when future.annotations is used by @smithk86 in https://github.com/starlite-api/starlite/pull/748

    New Contributors

    • @ottermata made their first contribution in https://github.com/starlite-api/starlite/pull/743
    • @smithk86 made their first contribution in https://github.com/starlite-api/starlite/pull/748

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.35.1...v1.36.0

    Source code(tar.gz)
    Source code(zip)
  • v1.35.1(Oct 30, 2022)

    What's Changed

    • Fix hard dependency on cryptography package in testing.test_client.client by @provinzkraut in https://github.com/starlite-api/starlite/pull/711
    • Fix invalid base_url of TestClient (fixes #706) by @provinzkraut in https://github.com/starlite-api/starlite/pull/708

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.35.0...v1.35.1

    Source code(tar.gz)
    Source code(zip)
  • v1.35.0(Oct 29, 2022)

    What's Changed

    • Update SQLAlchemyPlugin to use a context-manager for sessions by @provinzkraut in https://github.com/starlite-api/starlite/pull/698
    • Add support for setting sessions explicit to Empty. by @provinzkraut in https://github.com/starlite-api/starlite/pull/697
    • Fix SQLAlchemyPlugin.to_dict() where instance has a relationship. by @peterschutt in https://github.com/starlite-api/starlite/pull/699
    • Add copy function route handlers upon registration by @jtraub in https://github.com/starlite-api/starlite/pull/704
    • Update test client session setting by @provinzkraut in https://github.com/starlite-api/starlite/pull/705
    • Add support for mount routes by @Goldziher in https://github.com/starlite-api/starlite/pull/694

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.34.0...v1.35.0

    Source code(tar.gz)
    Source code(zip)
  • v1.34.0(Oct 27, 2022)

    What's Changed

    • Add a __test__ = False attribute to the TestClient so it won't get collected by pytest together with an async test by @provinzkraut in https://github.com/starlite-api/starlite/pull/688
    • Fix an issue (#693) where header values would be forced to lower case. by @provinzkraut in https://github.com/starlite-api/starlite/pull/695
    • Add support for server-side sessions by @provinzkraut & @Goldziher in https://github.com/starlite-api/starlite/pull/630

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.33.0...v1.34.0

    Source code(tar.gz)
    Source code(zip)
  • v1.33.0(Oct 26, 2022)

    What's Changed

    • Update drop await for anyio.Event.set (deprecated) by @provinzkraut in https://github.com/starlite-api/starlite/pull/677
    • Rebrush docs by @dkress59 in https://github.com/starlite-api/starlite/pull/679
    • Add Konstantin Mikhailov as a maintainer by @jtraub in https://github.com/starlite-api/starlite/pull/684
    • Switch pipeline to use v3.11 by @Goldziher in https://github.com/starlite-api/starlite/pull/682
    • Fix mock.patch / async test issues on Python 3.7 by @provinzkraut in https://github.com/starlite-api/starlite/pull/685
    • Replace Starlette TestClient with Starlite TestClient by @Goldziher in https://github.com/starlite-api/starlite/pull/664

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.32.0...v1.33.0

    Source code(tar.gz)
    Source code(zip)
  • v1.32.0(Oct 24, 2022)

    What's Changed

    • Add BackgroundTask and BackgroundTasks to replace Starlette by @Goldziher in https://github.com/starlite-api/starlite/pull/626.
    • Add Etag support to File and update response containers by @Goldziher in https://github.com/starlite-api/starlite/pull/626.
    • Add RedirectResponse, FileResponse and StreamingResponse to replace Starlette by @Goldziher in https://github.com/starlite-api/starlite/pull/626.
    • Add status_codes constants by @Goldziher in https://github.com/starlite-api/starlite/pull/626.
    • Fix cache classes being coupled to asyncio by @Goldziher in https://github.com/starlite-api/starlite/pull/626.
    • Update Response to replace Starlette by @Goldziher in https://github.com/starlite-api/starlite/pull/626.

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.31.0...v1.32.0

    Source code(tar.gz)
    Source code(zip)
  • v1.31.0(Oct 23, 2022)

    What's Changed

    • Allow to exclude routes in CSRFMiddleware by @jtraub in https://github.com/starlite-api/starlite/pull/633
    • Adds logging_config to ref docs for AppConfig by @peterschutt in https://github.com/starlite-api/starlite/pull/648
    • Support cache control headers by @seladb in https://github.com/starlite-api/starlite/pull/601
    • Fix Partial handling of ClassVar. by @Goldziher in https://github.com/starlite-api/starlite/pull/660
    • Add ETag headers (#573) by @provinzkraut in https://github.com/starlite-api/starlite/pull/661

    New Contributors

    • @mivade made their first contribution in https://github.com/starlite-api/starlite/pull/638
    • @pemocarlo made their first contribution in https://github.com/starlite-api/starlite/pull/643

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.30.0...v1.31.0

    Source code(tar.gz)
    Source code(zip)
  • v1.30.0(Oct 21, 2022)

    What's Changed

    • updated cache docs by @Goldziher in https://github.com/starlite-api/starlite/pull/614
    • Add url_for_static_asset to app and templates by @jtraub in https://github.com/starlite-api/starlite/pull/590
    • Improves and extends docs for Dependency function. by @peterschutt in https://github.com/starlite-api/starlite/pull/622
    • Improve readability in unique function by @odiseo0 in https://github.com/starlite-api/starlite/pull/621
    • Use TypeVar for ExceptionHandler exception parameter. by @peterschutt in https://github.com/starlite-api/starlite/pull/620
    • Fixes a typo Depend -> Depends (#597) by @ReznikovRoman in https://github.com/starlite-api/starlite/pull/624
    • Fix #628 by @provinzkraut in https://github.com/starlite-api/starlite/pull/629
    • SQLAlchemy JSON types mapped to Union[Dict, List] on DTOs. by @peterschutt in https://github.com/starlite-api/starlite/pull/635
    • Fix a typo dafne -> daphne by @mookrs in https://github.com/starlite-api/starlite/pull/636

    New Contributors

    • @ReznikovRoman made their first contribution in https://github.com/starlite-api/starlite/pull/624
    • @mookrs made their first contribution in https://github.com/starlite-api/starlite/pull/636

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.29.0...v1.30.0

    Source code(tar.gz)
    Source code(zip)
  • v1.29.0(Oct 18, 2022)

    What's Changed

    • Native support for TypedDict. by @peterschutt in https://github.com/starlite-api/starlite/pull/604

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.28.1...v1.29.0

    Source code(tar.gz)
    Source code(zip)
  • v1.28.1(Oct 16, 2022)

    What's Changed

    • Fix picologging using stdlib StreamHandler by @Goldziher in https://github.com/starlite-api/starlite/pull/610

    New Contributors

    • @jab made their first contribution in https://github.com/starlite-api/starlite/pull/607

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.28.0...v1.28.1

    Source code(tar.gz)
    Source code(zip)
  • v1.28.0(Oct 16, 2022)

    What's Changed

    • Add csrf_token template callable, csrf_input context value and allow registering template callables by @Goldziher in https://github.com/starlite-api/starlite/pull/598
    • Add official trio support by @provinzkraut in https://github.com/starlite-api/starlite/pull/586
    • Add support for ConstrainedDate in OpenAPI schema generation by @Goldziher in https://github.com/starlite-api/starlite/pull/589
    • Add tox scripts for common commands by @seladb in https://github.com/starlite-api/starlite/pull/579
    • Fix NoReturn as allowed return typing for delete decorators by @Goldziher in https://github.com/starlite-api/starlite/pull/588
    • Fix documentation warnings by @seladb in https://github.com/starlite-api/starlite/pull/580
    • Fix signature model for dependency with skip_validaiton and `default`` by @peterschutt in https://github.com/starlite-api/starlite/pull/595
    • Update QueueListenerHandler to log to stderr by default by @peterschutt in https://github.com/starlite-api/starlite/pull/594

    New Contributors

    • @provinzkraut made their first contribution in https://github.com/starlite-api/starlite/pull/586

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.27.0...v1.28.0

    Source code(tar.gz)
    Source code(zip)
  • v1.27.0(Oct 12, 2022)

    What's Changed

    • Add Redis cache backend by @seladb in https://github.com/starlite-api/starlite/pull/564
    • Add memcached cache backend by @seladb in https://github.com/starlite-api/starlite/pull/576
    • Add url_for function in templates by @jtraub in https://github.com/starlite-api/starlite/pull/577

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.26.1...v1.27.0

    Source code(tar.gz)
    Source code(zip)
  • v1.26.1(Oct 10, 2022)

    What's Changed

    • fix support for optional upload file by @Goldziher in https://github.com/starlite-api/starlite/pull/575

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.26.0...v1.26.1

    Source code(tar.gz)
    Source code(zip)
  • v1.26.0(Oct 9, 2022)

    What's Changed

    • Add cache property getter to ASGIConnection by @Goldziher in https://github.com/starlite-api/starlite/pull/552
    • Add support for using custom Request and WebSocket classes. by @Goldziher in https://github.com/starlite-api/starlite/pull/554
    • Update SQLAlchemyConfig connection_string to be optional. by @peterschutt in https://github.com/starlite-api/starlite/pull/556
    • Update RequestFactory to set empty session dict by default by @infohash in https://github.com/starlite-api/starlite/pull/559
    • Update typing of the session_maker_* attributes to protocols in SQLAlchemyConfig`. by @peterschutt in https://github.com/starlite-api/starlite/pull/561
    • Update templating to inject the Request instance into context by @jtraub in https://github.com/starlite-api/starlite/pull/563
    • Update RequestFactory to support session creation from raw session string by @infohash in https ://github.com/starlite-api/starlite/pull/568
    • Update OpenAPIController to allow configuring of the JS bundles used (for environments without CDN access etc.) by @nielsvanhooy in https://github.com/starlite-api/starlite/pull/562
    • Fix route handler name indexing by @Goldziher in https://github.com/starlite-api/starlite/pull/569
    • Fix parsing of large file uploads via httpx (starlite-multipart lib)

    New Contributors

    • @chbndrhnns made their first contribution in https://github.com/starlite-api/starlite/pull/565
    • @nielsvanhooy made their first contribution in https://github.com/starlite-api/starlite/pull/562

    Full Changelog: https://github.com/starlite-api/starlite/compare/v1.25.0...v1.26.0

    Source code(tar.gz)
    Source code(zip)
Owner
Na'aman Hirschfeld
Full-stack developer with a passion for coding and open source
Na'aman Hirschfeld
Bablyon 🐍 A small ASGI web framework

A small ASGI web framework that you can make asynchronous web applications using uvicorn with using few lines of code

xArty 8 Dec 7, 2021
An abstract and extensible framework in python for building client SDKs and CLI tools for a RESTful API.

django-rest-client An abstract and extensible framework in python for building client SDKs and CLI tools for a RESTful API. Suitable for APIs made wit

Certego 4 Aug 25, 2022
A minimal, extensible, fast and productive API framework for Python 3.

molten A minimal, extensible, fast and productive API framework for Python 3. Changelog: https://moltenframework.com/changelog.html Community: https:/

Bogdan Popa 980 Nov 28, 2022
The lightning-fast ASGI server. ?

The lightning-fast ASGI server. Documentation: https://www.uvicorn.org Community: https://discuss.encode.io/c/uvicorn Requirements: Python 3.6+ (For P

Encode 6k Jan 3, 2023
Chisel is a light-weight Python WSGI application framework built for creating well-documented, schema-validated JSON web APIs

chisel Chisel is a light-weight Python WSGI application framework built for creating well-documented, schema-validated JSON web APIs. Here are its fea

Craig Hobbs 2 Dec 2, 2021
Fully featured framework for fast, easy and documented API development with Flask

Flask RestPlus IMPORTANT NOTICE: This project has been forked to Flask-RESTX and will be maintained by by the python-restx organization. Flask-RESTPlu

Axel H. 2.7k Jan 4, 2023
Flask-Potion is a RESTful API framework for Flask and SQLAlchemy, Peewee or MongoEngine

Flask-Potion Description Flask-Potion is a powerful Flask extension for building RESTful JSON APIs. Potion features include validation, model resource

DTU Biosustain 491 Dec 8, 2022
Fully featured framework for fast, easy and documented API development with Flask

Flask RestPlus IMPORTANT NOTICE: This project has been forked to Flask-RESTX and will be maintained by by the python-restx organization. Flask-RESTPlu

Axel H. 2.5k Feb 17, 2021
Flask-Potion is a RESTful API framework for Flask and SQLAlchemy, Peewee or MongoEngine

Flask-Potion Description Flask-Potion is a powerful Flask extension for building RESTful JSON APIs. Potion features include validation, model resource

DTU Biosustain 484 Feb 3, 2021
Lemon is an async and lightweight API framework for python

Lemon is an async and lightweight API framework for python . Inspired by Koa and Sanic .

Joway 29 Nov 20, 2022
Endpoints is a lightweight REST api framework written in python and used in multiple production systems that handle millions of requests daily.

Endpoints Quickest API builder in the West! Endpoints is a lightweight REST api framework written in python and used in multiple production systems th

Jay Marcyes 30 Mar 5, 2022
APIFlask is a lightweight Python web API framework based on Flask and marshmallow-code projects

APIFlask APIFlask is a lightweight Python web API framework based on Flask and marshmallow-code projects. It's easy to use, highly customizable, ORM/O

Grey Li 705 Jan 4, 2023
Pyrin is an application framework built on top of Flask micro-framework to make life easier for developers who want to develop an enterprise application using Flask

Pyrin A rich, fast, performant and easy to use application framework to build apps using Flask on top of it. Pyrin is an application framework built o

Mohamad Nobakht 10 Jan 25, 2022
Asita is a web application framework for python based on express-js framework.

Asita is a web application framework for python. It is designed to be easy to use and be more easy for javascript users to use python frameworks because it is based on express-js framework.

Mattéo 4 Nov 16, 2021
REST API framework designed for human beings

Eve Eve is an open source Python REST API framework designed for human beings. It allows to effortlessly build and deploy highly customizable, fully f

eve 6.6k Jan 7, 2023
Restful API framework wrapped around MongoEngine

Flask-MongoRest A Restful API framework wrapped around MongoEngine. Setup from flask import Flask from flask_mongoengine import MongoEngine from flask

Close 525 Jan 1, 2023
Restful API framework wrapped around MongoEngine

Flask-MongoRest A Restful API framework wrapped around MongoEngine. Setup from flask import Flask from flask_mongoengine import MongoEngine from flask

Close 505 Feb 11, 2021
REST API framework designed for human beings

Eve Eve is an open source Python REST API framework designed for human beings. It allows to effortlessly build and deploy highly customizable, fully f

eve 6.3k Feb 17, 2021
A public API written in Python using the Flask web framework to determine the direction of a road sign using AI

python-public-API This repository is a public API for solving the problem of the final of the AIIJC competition. The task is to create an AI for the c

Lev 1 Nov 8, 2021