torchcell.literature.LiteratureServerConfig

class LiteratureServerConfig(*, mirror_root: Path, keys: LiteratureKeys, host: str = '0.0.0.0', port: int = 8723)[source]

Bases: BaseModel

Runtime configuration for the literature endpoint.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod from_env() → LiteratureServerConfig[source]

Build config from env: DATA_ROOT + TC_LIT_*.