Faster FastAPI start-up time for Projects with many nested routers
Project description
fastapi-deferred-init
WARNING: Early release. Might need more testing. Feel free to add tests if you have issues
The Problem
When using nested routers in a FastAPI project its start-up time can get long quite fast. That is because every router re-calculates the routes defined by a nested router when including it and the pre-calculated values by the nested router never gets used.
The Solution
This library provides a modified APIRoute that defers the calculation of values to the first actual attribute access. A router which uses the route as a default is also provided.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for fastapi_deferred_init-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaf6967dbc01cf22d71796664215f3945f0660e6e453e85f93060bbd7595b397 |
|
MD5 | 84d4fd091dbf92381c8af6bb5f42a351 |
|
BLAKE2b-256 | 0261a0be0f260c92da2943ed7f3167202bfb6e923d3ce98f75098a943ca13fc5 |
Close
Hashes for fastapi_deferred_init-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63192dcbc94657f6b195833550b0c1df722b408033cf434fa02c6f7dd48c02b9 |
|
MD5 | 7197077c1796a88a05f0a8aca47484a7 |
|
BLAKE2b-256 | 2771cd2217ca478c44d785952458bc8d79753ac83fba923bc562fbc0592f3d17 |