rs_server_common/settings.md¶
Store diverse objects and values used throughout the application.
del_http_client()
async
¶
Close and delete HTTP client.
docs_params(prefix='')
¶
Return the docs parameters for the FastAPI application.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prefix
|
str
|
Prefix to prepend to default values, when RSPY_DOCS_URL is not set. Defaults to "". |
''
|
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
dict[str, str]: dict with FastAPI docs_url and openapi_url keys. |
Source code in docs/rs-server/services/common/rs_server_common/settings.py
env_bool(var, default)
¶
Return True if an environemnt variable is set to 1, true or yes (case insensitive). Return False if set to 0, false or no (case insensitive). Return the default value if not set or set to a different value.
Source code in docs/rs-server/services/common/rs_server_common/settings.py
http_client()
¶
request_from_stacbrowser(request)
¶
Return if the HTTP request comes from the STAC browser.