List of functions in the ude.storage namespace.

Entity NameDescription
save_compressed_irSerializes a ProjectCatalog model into JSON and compresses it on-the-fly using Gzip.
load_compressed_irReads a Gzip-compressed file, decompresses it, and parses it into a typed ProjectCatalog.
calculate_sha256Calculates the SHA-256 hash of a string or bytes content.
compute_template_hashCalculates a stable SHA-256 hash of all file contents inside a template directory.
get_file_metadataRetrieves modification time, size, and SHA-256 content hash of a file.

Generated with Flude

Copyright © 2026

Directory & Entity Index

Entity NameSummary / Description
calculate_sha256 function

Calculates the SHA-256 hash of a string or bytes content.

Returns:

The hex-encoded SHA-256 digest.

Methods

calculate_sha256

calculate_sha256(content: Union) -> str

Calculates the SHA-256 hash of a string or bytes content.

Returns:

The hex-encoded SHA-256 digest.

ParameterTypeDescription
contentUnionThe content to hash; str is encoded as UTF-8 first.

Generated with Flude

Copyright © 2026

compute_template_hash function

Calculates a stable SHA-256 hash of all file contents inside a template directory.

Files are read in UTF-8 and hashed in alphabetical order of their relative path to ensure cross-platform stability.

Returns:

The hex-encoded SHA-256 digest of the combined file contents, or ""

Methods

compute_template_hash

compute_template_hash(template_dir: Union) -> str

Calculates a stable SHA-256 hash of all file contents inside a template directory.

Files are read in UTF-8 and hashed in alphabetical order of their relative path to ensure cross-platform stability.

get_file_metadata function

Retrieves modification time, size, and SHA-256 content hash of a file.

Returns:

A 3-tuple of (mtime, size in bytes, hex-encoded SHA-256 digest).

Methods

get_file_metadata

get_file_metadata(file_path: Union) -> tuple[float, int, str]

Retrieves modification time, size, and SHA-256 content hash of a file.

Returns:

A 3-tuple of (mtime, size in bytes, hex-encoded SHA-256 digest).

ParameterTypeDescription
file_pathUnionPath to the file to inspect.

Generated with Flude

load_compressed_ir function

Reads a Gzip-compressed file, decompresses it, and parses it into a typed ProjectCatalog.

Raises: FileNotFoundError: If the file does not exist.

Returns:

The deserialized and validated ProjectCatalog instance.

Methods

load_compressed_ir

load_compressed_ir(file_path: Union) -> ProjectCatalog

Reads a Gzip-compressed file, decompresses it, and parses it into a typed ProjectCatalog.

Raises: FileNotFoundError: If the file does not exist.

Returns:

The deserialized and validated ProjectCatalog instance.

ParameterTypeDescription
file_pathUnionThe file path to load from.

Generated with Flude

save_compressed_ir function

Serializes a ProjectCatalog model into JSON and compresses it on-the-fly using Gzip.

Methods

save_compressed_ir

save_compressed_ir(catalog: ProjectCatalog, file_path: Union)

Serializes a ProjectCatalog model into JSON and compresses it on-the-fly using Gzip.

ParameterTypeDescription
catalogProjectCatalogThe ProjectCatalog instance to save.
file_pathUnionThe target file path on disk (usually with a .json.gz extension).

Generated with Flude

Copyright © 2026