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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 282c469b8cbddd50ab6cd3632df78598eed7aa69dd0b687ba2aa9d3233a61362 |
|
MD5 | fc4ea87287dfecf8cf3c45322333dfb6 |
|
BLAKE2b-256 | d5a9d6bf894bf0fd44226ee24b64e080ad0b963ccf082044a329aba4107d680d |
Close
Hashes for fastapi_deferred_init-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c4125d7a132c6f236f6557dcd64a29ad39241a6e240e0b757066b3378bb19aa |
|
MD5 | f59ccc9b0084b668b89adb8db3e3fc12 |
|
BLAKE2b-256 | ee443d020e4f702cfba5927c6b7f5afd1f988b2dd381afbac41ec30ed4b82c2e |