simplevecdb.config
Environment configuration for SimpleVecDB.
Config
Configuration settings for SimpleVecDB, loaded from environment variables.
Attributes:
| Name | Type | Description |
|---|---|---|
EMBEDDING_MODEL |
str
|
The default embedding model repo id or alias. |
EMBEDDING_CACHE_DIR |
str
|
Directory path for caching embedding models. |
EMBEDDING_MODEL_REGISTRY |
dict[str, str]
|
Mapping of model aliases to repo ids. |
EMBEDDING_MODEL_REGISTRY_LOCKED |
bool
|
If True, only allow listed models. |
EMBEDDING_BATCH_SIZE |
int
|
Optimal batch size for embedding requests. |
EMBEDDING_SERVER_MAX_REQUEST_ITEMS |
int
|
Max items per embedding request. |
EMBEDDING_SERVER_API_KEYS |
set[str]
|
Set of valid API keys for the embedding server. |
DATABASE_PATH |
str
|
Path to the SimpleVecDB database file. |
SERVER_HOST |
str
|
Host address for the SimpleVecDB server. |
SERVER_PORT |
int
|
Port number for the SimpleVecDB server. |
Source code in src/simplevecdb/config.py
from_env()
classmethod
Return the module-level config instance.
.. note::
All Config attributes are evaluated at class-definition
time when this module is first imported. Setting environment
variables after import and calling Config.from_env() does
not re-read them — the values you get are whatever the
environment looked like at first import. Use the module-level
config singleton; do not rely on this method to refresh
values on demand.