tlcconfig¶
Configure the tlc package and Object Service
When importing the tlc package (e.g. import tlc), the default configuration will be picked from the config file and
environment variables (if set). To override these values at runtime, one can import the tlcconfig module and set the
configuration options prior to importing the tlc package.
- Example Usage:
import tlcconfig.options
import tlcconfig.option_loader
# Create a new OptionLoader instance. Pass false to constructor to prevent
# options being loaded from default configuration file and environment variables.
my_option_loader = tlcconfig.option_loader.OptionLoader(initialize=False)
# Set an option:
project_scan_urls = ["s3://bucket/path/to/projects", "file://home/path/to/projects"]
my_option_loader.set_value(tlcconfig.options.PROJECT_SCAN_URLS_OPTION, project_scan_urls)
# Set the global OptionLoader instance to the one we just created.
tlcconfig.option_loader.OptionLoader.set_instance(my_option_loader)
import tlc # This will use the options set above
# Use `tlc` package with your custom options
Modules and Packages¶
Module |
Description |
|---|---|
Default values for 3LC configuration files. |
|
Getters for default locations for 3LC directories. |
|
This module contains the OptionLoader class, which is used to load and store the 3LC options. |
|
Configuration options for 3LC |