swh.model.cli module

class swh.model.cli.CoreSWHIDParamType[source]

Bases: click.types.ParamType

Click argument that accepts a core SWHID and returns them as swh.model.swhids.CoreSWHID instances

name = 'SWHID'

the descriptive name of this type

convert(value, param, ctx) swh.model.swhids.CoreSWHID[source]

Converts the value. This is not invoked for values that are None (the missing value).

swh.model.cli.swhid_of_file(path) swh.model.swhids.CoreSWHID[source]
swh.model.cli.swhid_of_file_content(data) swh.model.swhids.CoreSWHID[source]
swh.model.cli.model_of_dir(path: bytes, exclude_patterns: Optional[Iterable[bytes]] = None) swh.model.from_disk.Directory[source]
swh.model.cli.swhid_of_dir(path: bytes, exclude_patterns: Optional[Iterable[bytes]] = None) swh.model.swhids.CoreSWHID[source]
swh.model.cli.swhid_of_origin(url)[source]
swh.model.cli.swhid_of_git_repo(path) swh.model.swhids.CoreSWHID[source]
swh.model.cli.identify_object(obj_type: str, follow_symlinks: bool, exclude_patterns: Iterable[bytes], obj) str[source]