Usage#

Open API Lookup package.

openapi_lookup.setup_logger()#

Setup logger.

Return type:

Logger

CLI module.

openapi_lookup.cli.cli()#

Command line interface.

Return type:

None

openapi_lookup.cli.filter_apis(apis, args)#

Filter APIs.

Parameters:
  • apis (List[Dict[str, Any]]) – List of APIs to filter.

  • args (argparse.Namespace) – Arguments to filter by.

Returns:

Filtered list of APIs.

Return type:

List[Dict[str, Any]]

openapi_lookup.cli.print_apis(apis, list_all, list_categories, list_auth_methods, list_https, list_cors)#

Print APIs.

Parameters:
  • apis (List[Any]) – List of APIs to print.

  • list_all (bool) – Show all results.

  • list_categories (bool) – Show categories in results.

  • list_auth_methods (bool) – Show authentication methods in results.

  • list_https (bool) – Show HTTPS support values in results.

  • list_cors (bool) – Show CORS support values in results.

Return type:

None

Github and data handler module.

openapi_lookup.openapis.get_raw_public_apis()#

Get raw public APIs from Github.

Returns:

Raw public APIs from Github.

Return type:

str

openapi_lookup.openapis.is_yes_no(value)#

Determine if value is yes/no.

Parameters:

value (Any) – Value to check.

Returns:

Value is yes/no.

Return type:

bool

openapi_lookup.openapis.parse_rows(raw_text)#

Parse rows from raw text.

Parameters:

raw_text (str) – Raw text to parse.

Returns:

List of parsed rows.

Return type:

List[Dict[str, Any]]

openapi_lookup.openapis.yes_no_to_bool(value)#

Convert yes/no to bool.

Parameters:

value (str) – Value to convert.

Returns:

Converted value.

Return type:

bool