torchcell.literature.LiteratureKeys
- class LiteratureKeys(*, hashes: dict[str, str])[source]
Bases:
ApiKeysThe shared
ApiKeysmodel bound to theTC_LIT_*variables.- classmethod from_pairs(spec: str, env_name: str = 'TC_LIT_API_KEYS') Self[source]
Parse
name1:key1,name2:key2plaintext pairs, hashing each key.
- classmethod from_env() Self[source]
Load keys from
TC_LIT_KEYS_FILE(preferred) orTC_LIT_API_KEYS.Raises
KeyErrorif neither is set – the server never runs unauthenticated.
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].