Skip to content

Config

toggl_api.config

AuthenticationError

Bases: ValueError

Authentication failed or was not provided.

generate_authentication() -> BasicAuth

Gathers credentials from environment variables.

Raises:

Returns:

  • BasicAuth ( BasicAuth ) –

    BasicAuth object that is used with httpx client.

use_togglrc(config_path: Optional[Path] = None) -> BasicAuth

Gathers credentials from environment variables.

Mainly here for backwards compatibility.

Parameters:

  • config_path (Optional[Path], default: None ) –

    Path to .togglrc folder not file. If None, will use $HOME/.togglrc for the default location.

Raises:

Returns:

  • BasicAuth ( BasicAuth ) –

    BasicAuth object that is used with httpx client.