module documentation

Undocumented

Function ensure_scheme Undocumented
Function get_valid_filename Return the given string converted to a string that can be used for a clean filename. Stolen from Django, I think.
Function get_version Parse a version string like <major>.<minor>.<micro> into a tuple of ints.
Function is_timenow_between Undocumented
Function open_text Return a file-like object opened for text reading of the resource.
Function parse_commas_separated_str Undocumented
Function parse_targets Undocumented
Function perform Wrapper around executable and a list of objects. Will execute the callable on each object of the list. Parameters:
Function read_text Return the decoded string of the resource.
Function setup_logger Undocumented
Function strip_tags Undocumented
Variable _tag Undocumented
def ensure_scheme(url: str) -> str: (source)

Undocumented

def get_valid_filename(s: str) -> str: (source)

Return the given string converted to a string that can be used for a clean filename. Stolen from Django, I think.

def get_version(s: str) -> Tuple[int, ...]: (source)

Parse a version string like <major>.<minor>.<micro> into a tuple of ints.

def is_timenow_between(begin_time: time, end_time: time) -> bool: (source)

Undocumented

def open_text(package: str, resource: str, encoding: str = 'utf-8', errors: str = 'strict') -> TextIO: (source)

Return a file-like object opened for text reading of the resource.

def parse_commas_separated_str(string: str) -> List[str]: (source)

Undocumented

def parse_targets(targets: Iterable[str]) -> Iterator[str]: (source)

Undocumented

def perform(func: Callable[..., Any], elements: Iterable[Any], func_args: Optional[Dict[str, Any]] = None, asynch: bool = False, workers: Optional[int] = None) -> List[Any]: (source)

Wrapper around executable and a list of objects. Will execute the callable on each object of the list. Parameters:

  • func: callable stateless function. func is going to be called like func(item, **func_args) on all items in data.
  • elements: Perform the action on the elements in the list.
  • func_args: dict that will be passed by default to func in all calls.
  • asynch: execute the task asynchronously
  • workers: mandatory if asynch is true.

Returns a list of returned results

def read_text(package: str, resource: str, encoding: str = 'utf-8', errors: str = 'strict') -> str: (source)

Return the decoded string of the resource.

The decoding-related arguments have the same semantics as those of bytes.decode().

def setup_logger(name: str, verbose: bool = False, quiet: bool = False) -> logging.Logger: (source)

Undocumented

def strip_tags(html: str) -> str: (source)

Undocumented

Undocumented