duck.setup¶
Module for setting up Duck space and configure all necessary components to ensure the application is ready for operation.
Submodules¶
Package Contents¶
Functions¶
Initial function for Duck application directories creation. |
|
Configure the event loop policy based on SETTINGS[“ASYNC_LOOP”]. |
|
Setup the Duck application. |
API¶
- duck.setup.makedirs()¶
Initial function for Duck application directories creation.
- duck.setup.set_asyncio_loop()¶
Configure the event loop policy based on SETTINGS[“ASYNC_LOOP”].
Supports:
“asyncio”: Default Python event loop (no changes made)
“uvloop”: High-performance event loop (requires uvloop installed)
- Raises:
SettingsError – If the specified ASYNC_LOOP value is unsupported.
- duck.setup.setup(make_app_dirs: bool = True, use_threads_for_heavy_work: bool = True)¶
Setup the Duck application.
Initialize and configure all necessary components to ensure the application is ready for operation.
- Parameters:
make_app_dirs – Whether to create application directories which might be useful to the project.
… admonition:: Notes
This configures and registers all routes either simple or ones created