Reference¶
dsg_lib.fastapi_functions.default_endpoints
¶
create_default_router(config)
¶
Creates a router with default endpoints, including a configurable robots.txt.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
List[Dict[str, str]]
|
A list of dictionaries specifying which bots are allowed or disallowed. |
required |
Returns:
Name | Type | Description |
---|---|---|
APIRouter |
APIRouter
|
A FastAPI router with the default endpoints. |
Source code in dsg_lib/fastapi_functions/default_endpoints.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|