prereise.cli package

Subpackages

Submodules

prereise.cli.constants module

prereise.cli.helpers module

prereise.cli.helpers.add_data_source_to_download_parser(data_source, subparsers)[source]

Helper function that adds an additional source of data that the user can interact with and download via the command line tool

Parameters:
  • data_source (prereise.cli.data_sources.data_source.DataSource) – an instance of a class that implements the abstract class DataSource

  • subparsers (argparse.ArgumentParser) – subparser object that implements command line interface functionality

prereise.cli.helpers.validate_date(date_string)[source]

Helper function to validate date strings

Parameters:

date_string (str) – date in string format to be validated

Returns:

(str) – validated date string

prereise.cli.helpers.validate_file_path(file_path)[source]

Helper function to validate file paths

Parameters:

file_path (str) – path include filename for where to save the file

Raises:

ValueError – if the provided file path is not accessible

Returns:

(str) – validated file path

prereise.cli.helpers.validate_year(year_string)[source]

Helper function to validate year strings

Parameters:

year_string (str) – year in string format to be validated

Returns:

(str) – validated year string

Module contents