Skip to content

DisplayConfig


dataclass backtide.config.DisplayConfig

Configuration for display parameters.

The display parameters control how values are presented in the UI application. Read more in the user guide.

Attributes

date_format : str, default="YYYY-MM-DD"

Format in which to display dates in momentjs style. Valid formats include YYYY/MM/DD, DD/MM/YYYY, or MM/DD/YYYY and can also use a period (.) or hyphen (-) as separators.

time_format : str, default="HH:MM"
Format in which to display timestamps in momentjs style. Valid formats include HH:MM:SS (include seconds), hh:mm a (show am/pm).

timezone : str | None, default=None
IANA timezone name. None to use the system's local timezone.

currency_prefix : bool, default=True
Whether to place currency symbols before the amount (True) or after the amount (False).

logokit_api_key : str | None, default=None
API key for the logokit website, which is used to fetch images for instruments. If None, no images are loaded.

address : str | None, default=None
The address where the streamlit server will listen for client and browser connections. Use this if you want to bind the server to a specific address. If set, the server will only be available from this address, and not from any aliases (like localhost).

port : int, default=8501
TCP port the server listens on.


See Also

get_config

Get a copy of the current global configuration.

load_config

Load a backtide configuration from a file.

set_config

Set the global configuration.


Methods

datetime_format Return the configuration's format for a datetime timestamp.
to_dict Convert the configuration object to a dictionary.


method backtide.configdatetime_format()

Return the configuration's format for a datetime timestamp.

Returns

str

Datetime format.



method backtide.configto_dict()

Convert the configuration object to a dictionary.

Returns

dict

Self as dict.