3.1. nordigen_cli package

3.1.1. Subpackages

3.1.2. Submodules

3.1.3. nordigen_cli.config module

class nordigen_cli.config.BaseConfigManager[source]

Bases: ABC

abstract get(key, default=None)[source]
class nordigen_cli.config.ConfigManager(*args, **kwargs)[source]

Bases: BaseConfigManager

copy()[source]
get(key, default=None)[source]
init_config()[source]
set(key, value, local=False)[source]

3.1.4. nordigen_cli.exception_handler module

class nordigen_cli.exception_handler.ExceptionHandler(app: Typer)[source]

Bases: object

handle_command(func: Callable) Callable[source]

Decorator to wrap commands with exception handling

register_exception(exception_classes: type[Exception] | list[type[Exception]], handler: Callable)[source]

Register an exception handler for specific exception types

wrap_all_commands()[source]

Wrap all commands in the app with exception handling

nordigen_cli.exception_handler.handle_404_error(exc: PageNotFoundError)[source]
nordigen_cli.exception_handler.handle_api_error(exc: APIRequestError)[source]
nordigen_cli.exception_handler.handle_endpoint_unavailable(exc: UnexpectedError)[source]
nordigen_cli.exception_handler.handle_general_error(exc: Exception)[source]
nordigen_cli.exception_handler.handle_invalid_token(exc: TokenFormatError)[source]
nordigen_cli.exception_handler.handle_typer_error(exc: Exit)[source]
nordigen_cli.exception_handler.handle_validation_error(exc: ValidationError)[source]
nordigen_cli.exception_handler.setup_exception_handling(app: Typer)[source]

3.1.5. nordigen_cli.format_error module

nordigen_cli.format_error.show_config_report(config: BaseConfigManager) None[source]

show the configuration error

3.1.6. nordigen_cli.format_output module

class nordigen_cli.format_output.Formatter[source]

Bases: object

pr_account()[source]
pr_banks(banks, format)[source]
pr_transactions(transactions, format)[source]
class nordigen_cli.format_output.FormattingManager[source]

Bases: object

Manages available formatters and handles formatting requests

format_output(data: BaseModel | list[BaseModel] | dict | list[dict], format_type: str) None[source]

Format and output the data using the specified formatter

get_available_formats() list[str][source]

Return list of available format names

class nordigen_cli.format_output.JsonFormatter[source]

Bases: OutputFormatter

[green]Format[/green] output as JSON

format(data: BaseModel | list[BaseModel] | dict | list[dict]) str[source]

Format the data according to the specific formatter’s rules

class nordigen_cli.format_output.OutputFormatter[source]

Bases: ABC

Base class for output formatters

abstract format(data: BaseModel | list[BaseModel] | dict | list[dict]) str[source]

Format the data according to the specific formatter’s rules

class nordigen_cli.format_output.TableFormatter[source]

Bases: OutputFormatter

Format output as a Rich table

format(data: BaseModel | list[BaseModel] | dict | list[dict]) None[source]

Format the data according to the specific formatter’s rules

format_field(field)[source]
format_item_like(data: BaseModel | dict) None[source]
format_list_like(data: list[BaseModel] | list[dict]) None[source]

3.1.7. nordigen_cli.nordigen_cli module

nordigen_cli.nordigen_cli.callback_verbose(value: int | None)[source]
nordigen_cli.nordigen_cli.list_country_codes(ctx: Context)[source]

list ISO 3166 2-letter country codes

nordigen_cli.nordigen_cli.list_endusers(ctx)[source]

list any enduser ids that are associated with requisitions

nordigen_cli.nordigen_cli.main(ctx: ~typer.models.Context, _: ~typing.Annotated[bool | None, <typer.models.OptionInfo object at 0x7fb0c011f8c0>] = None, profile: ~typing.Annotated[str | None, <typer.models.OptionInfo object at 0x7fb0c011f800>] = 'default', secret_id: ~typing.Annotated[str, <typer.models.OptionInfo object at 0x7fb0c011fa10>] = None, secret_key: ~typing.Annotated[str, <typer.models.OptionInfo object at 0x7fb0c011fa70>] = None, api: ~typing.Annotated[str, <typer.models.OptionInfo object at 0x7fb0c011fb00>] = None, config_file: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7fb0c011fb90>] = PosixPath('/home/tomhodder/.config/nordigen_cli/config.json'), config_dir: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7fb0c011fc20>] = PosixPath('/home/tomhodder/.config/nordigen_cli'), access_token_file: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7fb0c011fcb0>] = PosixPath('/home/tomhodder/.config/nordigen_cli/access.json'), request_token_file: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7fb0c011fd40>] = PosixPath('/home/tomhodder/.config/nordigen_cli/default/request.json'), verbose: ~typing.Annotated[int | None, <typer.models.OptionInfo object at 0x7fb0c011fdd0>] = None, output_format: ~typing.Annotated[~fast_api.config.FormatChoices | None, <typer.models.OptionInfo object at 0x7fb0c011fe60>] = None)[source]

Nordigen API client

nordigen_cli.nordigen_cli.name_callback(value: str | None)[source]
nordigen_cli.nordigen_cli.version()[source]

3.1.8. nordigen_cli.redirect_handler module

class nordigen_cli.redirect_handler.ServerThread(app)[source]

Bases: Thread

run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

shutdown()[source]
nordigen_cli.redirect_handler.after_request_func(response)[source]
nordigen_cli.redirect_handler.run_flask_app(q: Queue)[source]
nordigen_cli.redirect_handler.run_flask_app_thread()[source]
nordigen_cli.redirect_handler.run_flask_app_thread2()[source]

3.1.9. nordigen_cli.redirect_handler2 module

nordigen_cli.redirect_handler2.handle_redirect()[source]
nordigen_cli.redirect_handler2.run_flask_app_thread3()[source]
nordigen_cli.redirect_handler2.run_server()[source]

3.1.10. nordigen_cli.settings module

class nordigen_cli.settings.SettingsConfig(_case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None, _env_nested_delimiter: str | None = None, _env_parse_none_str: str | None = None, _env_parse_enums: bool | None = None, _cli_prog_name: str | None = None, _cli_parse_args: bool | list[str] | tuple[str, ...] | None = None, _cli_settings_source: CliSettingsSource[Any] | None = None, _cli_parse_none_str: str | None = None, _cli_hide_none_type: bool | None = None, _cli_avoid_json: bool | None = None, _cli_enforce_required: bool | None = None, _cli_use_class_docs_for_groups: bool | None = None, _cli_exit_on_error: bool | None = None, _cli_prefix: str | None = None, _cli_flag_prefix_char: str | None = None, _cli_implicit_flags: bool | None = None, _cli_ignore_unknown_args: bool | None = None, _secrets_dir: PathType | None = None, *, config_file: Path = PosixPath('/home/tomhodder/.config/nordigen_cli/config.json'), config_dir: Path = PosixPath('/home/tomhodder/.config/nordigen_cli'), profile: str = 'default')[source]

Bases: BaseSettings

represents values that need to be available to determine the settings from various path and profile options that must be set up front

config_dir: Path
config_file: Path
model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'cli_avoid_json': False, 'cli_enforce_required': False, 'cli_exit_on_error': True, 'cli_flag_prefix_char': '-', 'cli_hide_none_type': False, 'cli_ignore_unknown_args': False, 'cli_implicit_flags': False, 'cli_parse_args': None, 'cli_parse_none_str': None, 'cli_prefix': '', 'cli_prog_name': None, 'cli_use_class_docs_for_groups': False, 'env_file': None, 'env_file_encoding': None, 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_parse_enums': None, 'env_parse_none_str': None, 'env_prefix': '', 'extra': 'forbid', 'json_file': None, 'json_file_encoding': None, 'nested_model_default_partial_update': False, 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_file': None, 'yaml_file_encoding': None}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

profile: str
class nordigen_cli.settings.SettingsDisplay(_case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None, _env_nested_delimiter: str | None = None, _env_parse_none_str: str | None = None, _env_parse_enums: bool | None = None, _cli_prog_name: str | None = None, _cli_parse_args: bool | list[str] | tuple[str, ...] | None = None, _cli_settings_source: CliSettingsSource[Any] | None = None, _cli_parse_none_str: str | None = None, _cli_hide_none_type: bool | None = None, _cli_avoid_json: bool | None = None, _cli_enforce_required: bool | None = None, _cli_use_class_docs_for_groups: bool | None = None, _cli_exit_on_error: bool | None = None, _cli_prefix: str | None = None, _cli_flag_prefix_char: str | None = None, _cli_implicit_flags: bool | None = None, _cli_ignore_unknown_args: bool | None = None, _secrets_dir: PathType | None = None, *, verbose: int = 1, output_format: FormatChoices = FormatChoices.RICH)[source]

Bases: BaseSettings

display settings that are used to determine how the output is displayed

model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'cli_avoid_json': False, 'cli_enforce_required': False, 'cli_exit_on_error': True, 'cli_flag_prefix_char': '-', 'cli_hide_none_type': False, 'cli_ignore_unknown_args': False, 'cli_implicit_flags': False, 'cli_parse_args': None, 'cli_parse_none_str': None, 'cli_prefix': '', 'cli_prog_name': None, 'cli_use_class_docs_for_groups': False, 'env_file': None, 'env_file_encoding': None, 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_parse_enums': None, 'env_parse_none_str': None, 'env_prefix': '', 'extra': 'forbid', 'json_file': None, 'json_file_encoding': None, 'nested_model_default_partial_update': False, 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_file': None, 'yaml_file_encoding': None}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_format: FormatChoices
verbose: int
class nordigen_cli.settings.SettingsRuntime(_case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None, _env_nested_delimiter: str | None = None, _env_parse_none_str: str | None = None, _env_parse_enums: bool | None = None, _cli_prog_name: str | None = None, _cli_parse_args: bool | list[str] | tuple[str, ...] | None = None, _cli_settings_source: CliSettingsSource[Any] | None = None, _cli_parse_none_str: str | None = None, _cli_hide_none_type: bool | None = None, _cli_avoid_json: bool | None = None, _cli_enforce_required: bool | None = None, _cli_use_class_docs_for_groups: bool | None = None, _cli_exit_on_error: bool | None = None, _cli_prefix: str | None = None, _cli_flag_prefix_char: str | None = None, _cli_implicit_flags: bool | None = None, _cli_ignore_unknown_args: bool | None = None, _secrets_dir: PathType | None = None, *, api: str, secret_id: str, secret_key: str, access_token_file: Path = PosixPath('/home/tomhodder/.config/nordigen_cli/access.json'), request_token_file: Path = PosixPath('/home/tomhodder/.config/nordigen_cli/default/request.json'), verbose: int = 1, output_format: FormatChoices = FormatChoices.RICH)[source]

Bases: BaseSettings

access_token_file: Path
api: str
model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'cli_avoid_json': False, 'cli_enforce_required': False, 'cli_exit_on_error': True, 'cli_flag_prefix_char': '-', 'cli_hide_none_type': False, 'cli_ignore_unknown_args': False, 'cli_implicit_flags': False, 'cli_parse_args': None, 'cli_parse_none_str': None, 'cli_prefix': '', 'cli_prog_name': None, 'cli_use_class_docs_for_groups': False, 'env_file': None, 'env_file_encoding': None, 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_parse_enums': None, 'env_parse_none_str': None, 'env_prefix': '', 'extra': 'forbid', 'json_file': None, 'json_file_encoding': None, 'nested_model_default_partial_update': False, 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_file': None, 'yaml_file_encoding': None}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_format: FormatChoices
request_token_file: Path
secret_id: str
secret_key: str
verbose: int

3.1.11. Module contents