torchcell.knowledge_graphs.supported_queries.registry.QueryRegistry
- class QueryRegistry(*, schema_version: Literal[1] = 1, queries: list[SupportedQuery])[source]
Bases:
BaseModelEvery registered query;
schema_versionversions this file’s shape.- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- get(query_id: str) SupportedQuery[source]
The query registered as
query_id; KeyError names the known ids.
- replace(query: SupportedQuery) QueryRegistry[source]
A registry with the entry of the same id swapped for
query.
- classmethod load(path: Path) QueryRegistry[source]
Read and validate a registry file.