ESC

Type to search...

Configuration Reference

EVOID reads config from evoid.toml, pyproject.toml [tool.evoid], or evoid_config.py.

Config Loading Order

  1. evoid.toml (service-level, highest priority)
  2. pyproject.toml [tool.evoid] (project-level)
  3. evoid_config.py (Python-native)
  4. Defaults (if nothing found)

Service

SettingEnv VarTypeDefaultDescription
service.namestr"evoid-service"Service name
service.versionstr"0.1.0"Service version

Runtime

SettingEnv VarTypeDefaultDescription
runtime.adapterEVOID_ADAPTERstr"asgi"Transport: asgi, cli, telegram, robyn, websocket
runtime.hostEVOID_HOSTstr"0.0.0.0"Bind host
runtime.portEVOID_PORTint8000Bind port (1-65535)

Engines

SettingEnv VarTypeDefaultDescription
engines.schemaEVOID_SCHEMAstr"native"Schema engine: native, pydantic, msgspec, attrs
engines.storageEVOID_STORAGEstr"memory"Storage: memory, sqlite, sqlalchemy, redis, postgres, scylla, smart_storage
engines.cacheEVOID_CACHEstr"memory"Cache: memory, redis
engines.serializerEVOID_SERIALIZERstr"json"Serializer: json, msgspec, orjson
engines.diEVOID_DIstr"native"DI engine: native
engines.loggerEVOID_LOGGERstr"structlog"Logger: structlog, loguru
engines.metricsEVOID_METRICSstr"simple"Metrics: simple, prometheus
engines.authEVOID_AUTHstr"simple"Auth: simple, jwt

Engine Options

Per-engine connection params via [engines.options.<name>]:

[engines.options.postgresql]
url = "postgres://localhost:5432/mydb"

[engines.options.redis]
url = "redis://localhost:6379"

[engines.options.sqlite]
db_path = "evoid.db"

Pipeline

SettingTypeDefaultDescription
pipeline.processorslist[str]["validate", "authorize"]Default processor chain

Python Config

from evoid.config import config

app = config(
    service={"name": "my-api", "version": "1.0.0"},
    runtime={"adapter": "asgi", "port": 8000},
    engines={"storage": "sqlite", "cache": "redis"},
    pipeline={"processors": ["validate", "authorize"]},
)

TOML Config

[service]
name = "my-api"
version = "1.0.0"

[runtime]
adapter = "asgi"
host = "0.0.0.0"
port = 8000

[engines]
schema = "native"
storage = "sqlite"
cache = "redis"
serializer = "json"

[pipeline]
processors = ["validate", "authorize"]

pyproject.toml

[tool.evoid]
adapter = "asgi"
port = 8000

[tool.evoid.engines]
storage = "sqlite"
cache = "memory"