torchcell.literature.ZoteroConfig
- class ZoteroConfig(*, library_id: str, library_type: Literal['group', 'user'] = 'group', api_key: SecretStr)[source]
Bases:
BaseModelCredentials for a single Zotero library.
For the TorchCell group library only two values are needed: the group id and an API key.
library_typedefaults to"group"– the only mode we use. The key is wrapped inSecretStrso it never leaks into logs or reprs.- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod from_env() ZoteroConfig[source]
Build credentials from
ZOTERO_LIBRARY_ID+ZOTERO_API_KEY.ZOTERO_LIBRARY_TYPEis honored if set but defaults to"group". RaisesKeyErrorif either required variable is missing – we do not silently degrade to an unauthenticated client.