rs_server_common/settings.md
Store diverse objects and values used throughout the application.
del_http_client()
async
Close and delete HTTP client.
Source code in docs/rs-server/services/common/rs_server_common/settings.py
102 103 104 105 106 107 | |
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
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
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
28 29 30 31 32 33 34 35 36 37 38 39 | |
http_client()
Get HTTP client
Source code in docs/rs-server/services/common/rs_server_common/settings.py
91 92 93 | |
request_from_stacbrowser(request)
Return if the HTTP request comes from the STAC browser.
Source code in docs/rs-server/services/common/rs_server_common/settings.py
53 54 55 | |
set_http_client(value)
Set HTTP client
Source code in docs/rs-server/services/common/rs_server_common/settings.py
96 97 98 99 | |