GlobalAppConfig holds configuration fields related to the global application.
Here are the (optional) configurable properties:
- root_folder: The path of the base folder for the taipy application, its default value is "./taipy/".
- storage_folder: The folder name used to store Taipy data, its default value is ".data/". It is used in conjunction with the root_folder field. That means the default storage path is "./taipy/.data/".
- clean_entities_enabled: The field to activate/deactivate the clean entities feature.
Its default value is
ENV[TAIPY_CLEAN_ENTITIES_ENABLED]:boolmeaning that the default value is read from the
TAIPY_CLEAN_ENTITIES_ENABLEDenvironment variable. If the environment variable is not set, the default value is False.
Since it is risky to delete all entities on a production environment, Taipy proposes a way to activate this feature only on specific environments. That is why the default value points to an environment variable.
- read_entity_retry: The integer number of retry when reading an entity after a failed attempt (in case of concurrent access). The default value is 0.
- repository_type: The type of storage that will be used to hold Taipy entities. Available options are:
mongo. If no repository type is informed, the filesystem will be used as the default repository.
- repository_properties: A dictionary of properties that will be used to instantiate the chosen repository.
Only required if the chosen repository is
mongo. If repository_type is set to
filesystem, Taipy uses root_folder and storage_folder to store entities. In this case, repository_properties attribute is not required. If repository_type is set to
sql, the db_location attribute is required as the path of a sqlite3 database file. Please refer to SQL storage section. If repository_type is set to
mongo, the possible properties are mongodb_hostname, mongodb_user, mongodb_password, mongodb_port, application_db, properties. Please refer to MongoDB storage section.
1 2 3 4 5 6 7 8
1 2 3
1 2 3 4 5 6 7 8
In this example, we set custom values for the root_folder, storage_folder, clean_entities_enabled, and read_entity_retry parameters. Note that most of the time the default values can be used. In lines 7-8, two custom properties are specified: a version_name and an application_name.
SQL storage for Taipy entities¶
The configuration needed to use a SQL database, through sqlite3 engine, is described in the lines 7-8.
1 2 3 4 5 6 7 8 9 10
taipy_modelin the database described in the configuration, where it stores information about the taipy entities.
Here are the configurable properties for the SQL repository: - db_location: The path of a sqlite3 database file.
MongoDB storage for Taipy entities¶
Available in Taipy Enterprise edition
This section is relevant only to the Enterprise edition of Taipy.
The configuration needed to use a mongo database is described in the lines 7-14.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Taipy will create a collection, in the database described in the configuration, for each taipy entity(Cycle, Scenario, Pipeline, Datanode, Task and Job), where it will store information about the taipy entities.
Here are the configurable properties for the Mongo repository:
- mongodb_hostname: The URL for the mongo database.
- mongodb_user: The username to access the database.
- mongodb_password: The password to access the database.
- mongodb_port: The port to access the database. This property is optional and has 27017 as a default value.
- application_db: The database that will hold the taipy collections.
The next section introduces the job orchestration configuration.