Core

Warning

The functionality provided by the fseconomy.core module is reserved for internal purposes. It does not constitute an API intended for public use. This documentation is solely provided for the sake of completeness, and to support developers contributing to the fseconomy package.

Keys

fseconomy.core.keys.ACCESS_KEY: str | None = None

FSEconomy Access Key

fseconomy.core.keys.SERVICE_KEY: str | None = None

FSEconomy Service Key

fseconomy.core.keys.USER_KEY: str | None = None

FSEconomy User Key

fseconomy.core.keys.validate_key(key: str | None) bool

validates a new style FSEconomy API key

Parameters:

key (str) – string to validate

Returns:

True if string is a valid API key, otherwise False

fseconomy.core.keys.get_data_keys() dict[str, str]

get keys to query an FSEconomy data feed

This function uses a set of rules to deliver a valid result even if not all keys are set:

  • If available, the service key is preferred over the (personal) user key.

  • If no access key has been defined, the user key is used as default.

The function must be able to establish an authentication key (user or service key), and a data access key (read access or user key). In case of a failure, it raises either an FseDataKeyError or an FseAuthKeyError.

Raises:
Returns:

dictionary with keys

Return type:

dict[str, str]