![]() |
Terarea
2
The automation project
|
Functions | |
str | _get_environement_variable (dotenv environement, str variable_name) |
Any | _get_toml_variable (dict toml_conf, str section, str key, default=None) |
_summary_ This is the file in charge of containing the constants that run the server.
|
protected |
_summary_ Get the content of an environement variable. Args: variable_name (str): _description_ Returns: str: _description_: the value of that variable, otherwise an exception is raised.
Definition at line 21 of file constants.py.
|
protected |
Get the value of a configuration variable from the TOML file. Args: toml_conf (dict): The loaded TOML configuration as a dictionary. section (str): The section of the TOML file to search in. key (str): The key within the section to fetch. default: The default value to return if the key is not found. Defaults to None. Returns: str: The value of the configuration variable, or the default value if the key is not found. Raises: KeyError: If the section is not found in the TOML configuration.
Definition at line 39 of file constants.py.
list src.lib.components.constants.ALLOWED_METHODS |
Definition at line 312 of file constants.py.
src.lib.components.constants.API_REQUEST_DELAY |
Definition at line 253 of file constants.py.
int src.lib.components.constants.BIRTHDAY_INDEX_DB = 5 |
Definition at line 295 of file constants.py.
str src.lib.components.constants.CHAR_ACTIVE_KEY = "active" |
Definition at line 284 of file constants.py.
int src.lib.components.constants.CHAR_ID_DEFAULT_INDEX = 0 |
Definition at line 287 of file constants.py.
str src.lib.components.constants.CHAR_NAME_KEY = "name" |
Definition at line 285 of file constants.py.
str src.lib.components.constants.CHAR_NODE_KEY = "node" |
Definition at line 283 of file constants.py.
str src.lib.components.constants.CHAR_UID_KEY = "uid" |
Definition at line 286 of file constants.py.
src.lib.components.constants.CHECK_ACTIONS_INTERVAL |
Definition at line 222 of file constants.py.
src.lib.components.constants.CHECK_TOKEN_SIZE |
Definition at line 242 of file constants.py.
Any src.lib.components.constants.CLEAN_TOKENS = _get_toml_variable(TOML_CONF, "Crons", "clean_tokens", True) |
Definition at line 212 of file constants.py.
src.lib.components.constants.CLEAN_TOKENS_INTERVAL |
Definition at line 213 of file constants.py.
Any src.lib.components.constants.CLEAN_VERIFICATION |
Definition at line 225 of file constants.py.
Any src.lib.components.constants.CLEAN_VERIFICATION_INTERVAL |
Definition at line 228 of file constants.py.
str src.lib.components.constants.CONTENT_TYPE = "JSON" |
Definition at line 269 of file constants.py.
Any src.lib.components.constants.DATABASE_AUTOCOMMIT |
Definition at line 204 of file constants.py.
Any src.lib.components.constants.DATABASE_COLLATION |
Definition at line 207 of file constants.py.
src.lib.components.constants.DATABASE_CONNECTION_TIMEOUT |
Definition at line 174 of file constants.py.
Any src.lib.components.constants.DATABASE_DEFAULT_FILE |
Definition at line 183 of file constants.py.
Any src.lib.components.constants.DATABASE_INIT_COMMAND |
Definition at line 180 of file constants.py.
Any src.lib.components.constants.DATABASE_LOCAL_INFILE |
Definition at line 177 of file constants.py.
src.lib.components.constants.DATABASE_MAX_POOL_CONNECTIONS |
Definition at line 168 of file constants.py.
Any src.lib.components.constants.DATABASE_POOL_NAME |
Definition at line 165 of file constants.py.
Any src.lib.components.constants.DATABASE_RESET_POOL_NODE_CONNECTION |
Definition at line 171 of file constants.py.
Any src.lib.components.constants.DATABASE_SSL |
Definition at line 201 of file constants.py.
Any src.lib.components.constants.DATABASE_SSL_CA |
Definition at line 192 of file constants.py.
Any src.lib.components.constants.DATABASE_SSL_CERT |
Definition at line 189 of file constants.py.
Any src.lib.components.constants.DATABASE_SSL_CIPHER |
Definition at line 195 of file constants.py.
Any src.lib.components.constants.DATABASE_SSL_KEY |
Definition at line 186 of file constants.py.
Any src.lib.components.constants.DATABASE_SSL_VERIFY_CERT |
Definition at line 198 of file constants.py.
str src.lib.components.constants.DB_DATABASE = _get_environement_variable(ENV, "DB_DATABASE") |
Definition at line 109 of file constants.py.
str src.lib.components.constants.DB_HOST = _get_environement_variable(ENV, "DB_HOST") |
Definition at line 105 of file constants.py.
str src.lib.components.constants.DB_PASSWORD = _get_environement_variable(ENV, "DB_PASSWORD") |
Definition at line 108 of file constants.py.
src.lib.components.constants.DB_PORT = int(_get_environement_variable(ENV, "DB_PORT")) |
Definition at line 106 of file constants.py.
str src.lib.components.constants.DB_USER = _get_environement_variable(ENV, "DB_USER") |
Definition at line 107 of file constants.py.
Any src.lib.components.constants.DEBUG |
Definition at line 138 of file constants.py.
src.lib.components.constants.debug |
Definition at line 90 of file constants.py.
src.lib.components.constants.EMAIL_VERIFICATION_DELAY |
Definition at line 239 of file constants.py.
Any src.lib.components.constants.ENABLE_TEST_CRONS |
Definition at line 216 of file constants.py.
str src.lib.components.constants.ENDPOINT_KEY = "endpoint" |
Definition at line 310 of file constants.py.
src.lib.components.constants.ENV = dict(dotenv.dotenv_values()) |
Definition at line 15 of file constants.py.
src.lib.components.constants.ERROR |
Definition at line 133 of file constants.py.
int src.lib.components.constants.FIRSTNAME_INDEX_DB = 3 |
Definition at line 293 of file constants.py.
int src.lib.components.constants.GENDER_INDEX_DB = 7 |
Definition at line 296 of file constants.py.
str src.lib.components.constants.JSON_ERROR = "error" |
Definition at line 260 of file constants.py.
str src.lib.components.constants.JSON_HEADER_APP_NAME = "app_sender" |
Definition at line 266 of file constants.py.
str src.lib.components.constants.JSON_HEADER_HOST = "serving_host" |
Definition at line 267 of file constants.py.
str src.lib.components.constants.JSON_HEADER_PORT = "serving_port" |
Definition at line 268 of file constants.py.
str src.lib.components.constants.JSON_LOGGED_IN = "logged in" |
Definition at line 262 of file constants.py.
str src.lib.components.constants.JSON_MESSAGE = "msg" |
Definition at line 259 of file constants.py.
str src.lib.components.constants.JSON_RESP = "resp" |
Definition at line 261 of file constants.py.
str src.lib.components.constants.JSON_TITLE = "title" |
Definition at line 258 of file constants.py.
str src.lib.components.constants.JSON_UID = "user_uid" |
Definition at line 263 of file constants.py.
int src.lib.components.constants.LASTNAME_INDEX_DB = 4 |
Definition at line 294 of file constants.py.
str src.lib.components.constants.METHOD_KEY = "method" |
Definition at line 311 of file constants.py.
str src.lib.components.constants.MINIO_HOST = _get_environement_variable(ENV, "MINIO_HOST") |
Definition at line 112 of file constants.py.
src.lib.components.constants.MINIO_PORT = int(_get_environement_variable(ENV, "MINIO_PORT")) |
Definition at line 113 of file constants.py.
str src.lib.components.constants.MINIO_ROOT_PASSWORD = _get_environement_variable(ENV, "MINIO_ROOT_PASSWORD") |
Definition at line 115 of file constants.py.
str src.lib.components.constants.MINIO_ROOT_USER = _get_environement_variable(ENV, "MINIO_ROOT_USER") |
Definition at line 114 of file constants.py.
src.lib.components.constants.name |
Definition at line 10 of file constants.py.
int src.lib.components.constants.PASSWORD_INDEX_DB = 2 |
Definition at line 292 of file constants.py.
str src.lib.components.constants.PATH_KEY = "path" |
Definition at line 309 of file constants.py.
src.lib.components.constants.RANDOM_MAX |
Definition at line 248 of file constants.py.
src.lib.components.constants.RANDOM_MIN |
Definition at line 245 of file constants.py.
str src.lib.components.constants.REDIRECT_URI = _get_environement_variable(ENV, "REDIRECT_URI") |
Definition at line 102 of file constants.py.
Any src.lib.components.constants.RENEW_OATH_TOKENS |
Definition at line 231 of file constants.py.
Any src.lib.components.constants.RENEW_OATH_TOKENS_INTERVAL |
Definition at line 234 of file constants.py.
str src.lib.components.constants.REQUEST_BEARER_KEY = "authorization" |
Definition at line 321 of file constants.py.
str src.lib.components.constants.REQUEST_TOKEN_KEY = "token" |
Definition at line 320 of file constants.py.
int src.lib.components.constants.ROLE_INDEX_DB = 10 |
Definition at line 297 of file constants.py.
str src.lib.components.constants.SENDER_ADDRESS = _get_environement_variable(ENV, "SENDER_ADDRESS") |
Definition at line 96 of file constants.py.
str src.lib.components.constants.SENDER_HOST = _get_environement_variable(ENV, "SENDER_HOST") |
Definition at line 98 of file constants.py.
str src.lib.components.constants.SENDER_KEY = _get_environement_variable(ENV, "SENDER_KEY") |
Definition at line 97 of file constants.py.
src.lib.components.constants.SENDER_PORT = int(_get_environement_variable(ENV, "SENDER_PORT")) |
Definition at line 99 of file constants.py.
Any src.lib.components.constants.SERVER_DEV_LOG_LEVEL |
Definition at line 149 of file constants.py.
Any src.lib.components.constants.SERVER_DEV_RELOAD |
Definition at line 143 of file constants.py.
Any src.lib.components.constants.SERVER_DEV_RELOAD_DIRS |
Definition at line 146 of file constants.py.
Any src.lib.components.constants.SERVER_DEV_USE_COLOURS |
Definition at line 152 of file constants.py.
Any src.lib.components.constants.SERVER_LIFESPAN |
Definition at line 122 of file constants.py.
Any src.lib.components.constants.SERVER_PROD_FORWARDED_ALLOW_IPS |
Definition at line 160 of file constants.py.
Any src.lib.components.constants.SERVER_PROD_PROXY_HEADERS |
Definition at line 157 of file constants.py.
Any src.lib.components.constants.SERVER_TIMEOUT_KEEP_ALIVE |
Definition at line 125 of file constants.py.
Any src.lib.components.constants.SERVER_WORKERS |
Definition at line 119 of file constants.py.
src.lib.components.constants.SUCCESS |
Definition at line 130 of file constants.py.
str src.lib.components.constants.TAB_ACCOUNTS = "Users" |
Definition at line 272 of file constants.py.
str src.lib.components.constants.TAB_ACTION_LOGGING = "ActionLoging" |
Definition at line 278 of file constants.py.
str src.lib.components.constants.TAB_ACTION_TEMPLATE = "ActionTemplate" |
Definition at line 279 of file constants.py.
str src.lib.components.constants.TAB_ACTIONS = "Actions" |
Definition at line 273 of file constants.py.
str src.lib.components.constants.TAB_ACTIVE_OAUTHS = "ActiveOauths" |
Definition at line 277 of file constants.py.
str src.lib.components.constants.TAB_CONNECTIONS = "Connections" |
Definition at line 275 of file constants.py.
str src.lib.components.constants.TAB_SERVICES = "Services" |
Definition at line 274 of file constants.py.
str src.lib.components.constants.TAB_USER_OAUTH_CONNECTION = "UserOauthConnection" |
Definition at line 280 of file constants.py.
str src.lib.components.constants.TAB_VERIFICATION = "Verification" |
Definition at line 276 of file constants.py.
src.lib.components.constants.TEST_CRONS_INTERVAL |
Definition at line 219 of file constants.py.
int src.lib.components.constants.THREAD_CACHE_REFRESH_DELAY = 10 |
Definition at line 324 of file constants.py.
src.lib.components.constants.TOML_CONF = toml.load("config.toml") |
Definition at line 18 of file constants.py.
str src.lib.components.constants.UA_EMAIL_KEY = "email" |
Definition at line 328 of file constants.py.
str src.lib.components.constants.UA_LIFESPAN_KEY = "lifespan" |
Definition at line 329 of file constants.py.
int src.lib.components.constants.UA_TOKEN_LIFESPAN = 7200 |
Definition at line 327 of file constants.py.
str src.lib.components.constants.UD_ADMIN_KEY = "admin" |
Definition at line 304 of file constants.py.
str src.lib.components.constants.UD_BIRTHDAY_KEY = "birthday" |
Definition at line 301 of file constants.py.
str src.lib.components.constants.UD_FIRSTNAME_KEY = "firstname" |
Definition at line 299 of file constants.py.
str src.lib.components.constants.UD_GENDER_KEY = "gender" |
Definition at line 302 of file constants.py.
str src.lib.components.constants.UD_LASTNAME_KEY = "lastname" |
Definition at line 300 of file constants.py.
str src.lib.components.constants.UD_LOGGED_IN_KEY = "logged_in" |
Definition at line 306 of file constants.py.
str src.lib.components.constants.UD_LOGIN_TIME_KEY = "login_time" |
Definition at line 305 of file constants.py.
str src.lib.components.constants.UD_ROLE_KEY = "role" |
Definition at line 303 of file constants.py.
str src.lib.components.constants.UD_USERNAME_KEY = "username" |
Definition at line 298 of file constants.py.
str src.lib.components.constants.USER_INFO_ADMIN_NODE = "admin" |
Definition at line 333 of file constants.py.
list src.lib.components.constants.USER_INFO_BANNED = ["password", "method", "favicon"] |
Definition at line 332 of file constants.py.
int src.lib.components.constants.USERNAME_INDEX_DB = 1 |
Definition at line 291 of file constants.py.