ocrd_utils.introspect module

Utility functions to simplify access to data structures.

ocrd_utils.introspect.freeze_args(func)[source]

Transform mutable dictionary into immutable. Useful to be compatible with cache. Code taken from this post

ocrd_utils.introspect.membername(class_, val)[source]

Convert a member variable/constant into a member name string.

ocrd_utils.introspect.set_json_key_value_overrides(obj, *kvpairs)[source]
ocrd_utils.introspect.resource_filename(pkg: str, fname: str) Path[source]
ocrd_utils.introspect.resource_string(pkg: str, fname: str) str[source]
ocrd_utils.introspect.dist_version(module: str) str[source]