pydmt.utils package — pydmt Documentation

# pydmt.utils package

## Submodules

## pydmt.utils.digest module

digest.py

pydmt.utils.digest.hex_digest_file(filename: str, algorithm_name: str) → str

pydmt.utils.digest.hex_digest_files(filenames: list[str], algorithm_name: str) → str

pydmt.utils.digest.sha1_file(filename: str) → str

pydmt.utils.digest.sha1_files(filenames: list[str]) → str

pydmt.utils.digest.sha1_files_folders(files: list[str], folders: list[str]) → str

pydmt.utils.digest.sha1_folders(folders: list[str]) → str

## pydmt.utils.digester module

digester.py

class pydmt.utils.digester.Digester

  Bases: `object`

  add_file(filename: str) → None
  add_files(filenames: list[str]) → None
  add_files_folders(files: list[str], folders: list[str]) → None
  add_folders(folders: list[str]) → None
  get_hexdigest()

## pydmt.utils.filesystem module

filesystem.py

pydmt.utils.filesystem.copy_mkdir(source: str, destination: str)

pydmt.utils.filesystem.files_under_folder(folder: str, suffix: str | None = None) → list[str]

pydmt.utils.filesystem.files_under_folders(folders: list[str]) → list[str]

pydmt.utils.filesystem.makedirs_for_file(filename: str)

pydmt.utils.filesystem.mkdir_touch(filename: str) → None

pydmt.utils.filesystem.touch(filename: str) → None

pydmt.utils.filesystem.unlink_files(files: list[str], only_if_exist: bool = True) → None

## pydmt.utils.importlib module

importlib.y

pydmt.utils.importlib.module_exists(module_name)

  return if a module exists or not

## pydmt.utils.logging module

logging.py

pydmt.utils.logging.get_logger()

  This function returns the logger for pydmt

## pydmt.utils.php module

php.py

pydmt.utils.php.to_php(x)

## pydmt.utils.python module

python.y

pydmt.utils.python.collect_bootstrap_reqs() → list[str]

pydmt.utils.python.collect_reqs(add_dev=False) → list[str]

pydmt.utils.python.get_install_args()

pydmt.utils.python.hlp_files_under(destination_folder, pat)

pydmt.utils.python.hlp_source_under(folder)

  this function finds all the python packages under a folder and write the ‘packages’ and ‘package_dir’ entries for a python setup.py script

pydmt.utils.python.make_hlp_project_classifiers(d)

pydmt.utils.python.make_hlp_project_keywords(d)

pydmt.utils.python.make_hlp_project_platforms(d)

pydmt.utils.python.make_hlp_wrap(level)

## pydmt.utils.subprocess module

subprocess.py

pydmt.utils.subprocess.check_call(args: list[str]) → None

pydmt.utils.subprocess.check_call_ve(orig_args: list[str]) → None

pydmt.utils.subprocess.check_call_ve_env(args: list[str]) → None

## Module contents