Skip to content

Configurations

Cecilia Wong edited this page Apr 30, 2024 · 4 revisions

Environment-independent configurations

File: config.ini

Section Key Description
Logging log_level The default log level if none is configured in the environment variables (see below).
Logging format The log message format.

Environment variable(s)

Name Description Default
(if not set)
LOG_LEVEL Configures the application log level.
Set to DEBUG in flaskapp/.env for the local instance.

Ref: https://docs.python.org/3/howto/logging.html
INFO
(set in config.ini as mentioned above)
SIM_DELAY_HONBASHO_SCHEDULE Simulates webservice call delay at /getSumoHonbashoSchedule by sleeping for the configured number of seconds. Should be set only in local development. 0 (no delay)

Custom configuration for local testing

Create a new .env* configuration file and set it with the -e option when starting the webservice.

For example, for a configuration file .env.local in the flaskapp folder, the command would be:

python3 -m flask -A App.py -e flaskapp/.env.local run
Clone this wiki locally