cloup.types

Parameter types and “shortcuts” for creating commonly used types.

Functions

path(*[, path_type, exists, file_okay, …])

Shortcut for click.Path with path_type=pathlib.Path.

dir_path(*[, path_type, exists, writable, …])

Shortcut for click.Path with file_okay=False, path_type=pathlib.Path.

file_path(*[, path_type, exists, writable, …])

Shortcut for click.Path with dir_okay=False, path_type=pathlib.Path.

Contents

cloup.types.path(path_type=pathlib.Path, exists=False, file_okay=True, dir_okay=True, writable=False, readable=True, resolve_path=False, allow_dash=False)[source]

Shortcut for click.Path with path_type=pathlib.Path.

Parameters
  • path_type (type) –

  • exists (bool) –

  • file_okay (bool) –

  • dir_okay (bool) –

  • writable (bool) –

  • readable (bool) –

  • resolve_path (bool) –

  • allow_dash (bool) –

Return type

click.types.Path

cloup.types.dir_path(path_type=pathlib.Path, exists=False, writable=False, readable=True, resolve_path=False, allow_dash=False)[source]

Shortcut for click.Path with file_okay=False, path_type=pathlib.Path.

Parameters
  • path_type (type) –

  • exists (bool) –

  • writable (bool) –

  • readable (bool) –

  • resolve_path (bool) –

  • allow_dash (bool) –

Return type

click.types.Path

cloup.types.file_path(path_type=pathlib.Path, exists=False, writable=False, readable=True, resolve_path=False, allow_dash=False)[source]

Shortcut for click.Path with dir_okay=False, path_type=pathlib.Path.

Parameters
  • path_type (type) –

  • exists (bool) –

  • writable (bool) –

  • readable (bool) –

  • resolve_path (bool) –

  • allow_dash (bool) –

Return type

click.types.Path