otp.config#
- config = <onetick.py.configuration.Config object>#
This object is used to access onetick.py configuration options.
Configuration options may be changed by modifying properties of this object or by setting environment variables. Also, configuration options may be accessed via
config.['...']
syntax, e.g.config['tz']
The following is the order of priority of configuration values:
Value that is set explicitly
Value that is set via environment variable
Default value listed on this page
To reset configuration value that has been set explicitly,
None
should be assigned to it.The following properties can be changed:
- tz: <class 'NoneType'> or <class 'str'> = None#
Default timezone for queries and databases
Can be set using environment variable
OTP_DEFAULT_TZ
- context: <class 'str'> = DEFAULT#
Default context for query execution
Can be set using environment variable
OTP_CONTEXT
- default_start_time: <class 'datetime.datetime'> = <class 'onetick.py.configuration.nothing'>#
Default start time for queries
Can be set using environment variable
OTP_DEFAULT_START_TIME
Format of the env variable:
%Y/%m/%d %H:%M:%S.%f
,%Y/%m/%d %H:%M:%S
- default_end_time: <class 'datetime.datetime'> = <class 'onetick.py.configuration.nothing'>#
Default end time for queries
Can be set using environment variable
OTP_DEFAULT_END_TIME
Format of the env variable:
%Y/%m/%d %H:%M:%S.%f
,%Y/%m/%d %H:%M:%S
- default_db: <class 'str'> = <class 'onetick.py.configuration.nothing'>#
Default database
Can be set using environment variable
OTP_DEFAULT_DB
- default_symbol: <class 'str'> = <class 'onetick.py.configuration.nothing'>#
Default symbol
Can be set using environment variable
OTP_DEFAULT_SYMBOL
- default_symbology: <class 'str'> = BZX#
Default database symbology
Can be set using environment variable
OTP_DEFAULT_SYMBOLOGY
- default_concurrency: <class 'int'> = 32#
Default concurrency for queries
Can be set using environment variable
OTP_DEFAULT_CONCURRENCY
- default_batch_size: <class 'int'> = 0#
Default batch size for queries
Can be set using environment variable
OTP_DEFAULT_BATCH_SIZE
- default_license_dir: <class 'str'> or <class 'str'> = /license#
Default path for license directory
Can be set using environment variable
OTP_DEFAULT_LICENSE_DIR
- default_license_file: <class 'str'> or <class 'str'> = /license/license.dat#
Default path for license file
Can be set using environment variable
OTP_DEFAULT_LICENSE_FILE
- default_fault_tolerance: <class 'str'> or <class 'str'> = FALSE#
Default value for USE_FT query property
Can be set using environment variable
OTP_DEFAULT_FAULT_TOLERANCE
The following properties are derived and thus read-only:
- default_db_symbol: <class 'NoneType'> = None#
Default symbol with database.Defined as
config.default_db + "::" + config.default_symbol
- default_date: <class 'NoneType'> = None#
Default date.Defined as a date part of
config.default_start_time