anystore.settings
Settings
Bases: BaseSettings
anystore
settings management using
pydantic-settings
Note
All settings can be set via environment variables in uppercase,
prepending ANYSTORE_
(except for those with a given prefix)
Backend config: Use __
as a separator for dictionary content, e.g.:
ANYSTORE_BACKEND_CONFIG__REDIS_PREFIX="foo"
Source code in anystore/settings.py
backend_config: dict[str, Any] = {}
class-attribute
instance-attribute
Arbitrary backend config to pass through
debug: bool = Field(alias='debug', default=False)
class-attribute
instance-attribute
Enable debug mode
default_ttl: int = 0
class-attribute
instance-attribute
Key ttl for backends that support it (e.g. redis, sql)
json_uri: str | None = None
class-attribute
instance-attribute
Load a (remote) store configuration (json) from this uri
log_json: bool = Field(alias='log_json', default=False)
class-attribute
instance-attribute
Enable json log format
log_level: str = Field(alias='log_level', default='info')
class-attribute
instance-attribute
Log level (debug, info, warning, error)
raise_on_nonexist: bool = True
class-attribute
instance-attribute
Silence errors for non-existing keys
redis_debug: bool = Field(alias='redis_debug', default=False)
class-attribute
instance-attribute
Use fakeredis when using redis backend
serialization_mode: Mode | None = 'auto'
class-attribute
instance-attribute
Default serialization mode, one of ("auto", "pickle", "json", "raw")
uri: str | None = '.anystore'
class-attribute
instance-attribute
Default store base uri
worker_heartbeat: int = Field(alias='worker_heartbeat', default=15)
class-attribute
instance-attribute
Default heartbeat for worker logging
worker_threads: int = Field(alias='worker_threads', default=cpu_count())
class-attribute
instance-attribute
Default number of threads to use for workers
yaml_uri: str | None = None
class-attribute
instance-attribute
Load a (remote) store configuration (yaml) from this uri