cemento.utils package#
Submodules#
cemento.utils.constants module#
- exception cemento.utils.constants.NullTermError#
Bases:
ValueError
- class cemento.utils.constants.RDFFormat(*values)#
Bases:
Enum
- JSONLD = 'json-ld'#
- N3 = 'n3'#
- NT = 'nt'#
- TURTLE = 'turtle'#
- XML = 'xml'#
- classmethod from_ext(file_ext: str) Self #
- classmethod from_input(input_format: str) Self #
- static get_valid_file_extensions() list[str] #
- static get_valid_rdf_formats() list[str] #
- exception cemento.utils.constants.RDFFormatException(message='Error when parsing RDF format')#
Bases:
BaseException
cemento.utils.io module#
- cemento.utils.io.get_default_defaults_folder() Path #
- cemento.utils.io.get_default_path(rel_path: str | Path) Path #
- cemento.utils.io.get_default_prefixes_file() Path #
- cemento.utils.io.get_default_references_folder() Path #
cemento.utils.utils module#
- cemento.utils.utils.aggregate_defaultdict(acc: defaultdict[list], item: tuple[any, any]) defaultdict[list] #
- cemento.utils.utils.chain_filter(iterable: Iterable, *filters: Callable[[any], any])#
- cemento.utils.utils.enforce_camel_case(input: str) str #
- cemento.utils.utils.filter_graph(graph: DiGraph, data_filter: Callable[[dict[str, any]], bool]) DiGraph #
- cemento.utils.utils.fst(x: tuple[any, any]) any #
- cemento.utils.utils.get_abbrev_term(term: str, is_predicate=False, default_prefix='mds') tuple[str, str] #
- cemento.utils.utils.get_graph_root_nodes(graph: DiGraph) list[any] #
- cemento.utils.utils.get_subgraphs(graph: DiGraph) list[DiGraph] #
- cemento.utils.utils.remove_term_names(term: str) str #
- cemento.utils.utils.snd(x: tuple[any, any]) any #
- cemento.utils.utils.trd(x: tuple[any, any, any]) any #