Skip to main content

utils

Useful objects/functions for the hub.

This is primarily intended for use by modules outside the hub package. It cannot be imported by most modules in the hub package because it would introduce circular imports.

Module

Functions

hash_contents

def hash_contents(contents: Union[bytes, str])> str:

Hash contents using sha256.

hash_file_contents

def hash_file_contents(file_path: pathlib.Path)> str:

Hash file contents using sha256.