Configuration Overview
fyers-store is configuration-driven. Most behavior is controlled via YAML files under config/, with safe defaults and strict validation.
Path Resolution (explicit precedence)
Runtime config is never read from src/fyers_store_resources/config/; that folder only ships templates.
1) FYERS_CREDENTIALS_YAML=/absolute/or/relative/path/to/fyers_credentials.yaml (highest precedence)
2) FYERS_STORE_ROOT=/path/to/runtime_root → defaults to:
- credentials: ${FYERS_STORE_ROOT}/config/fyers_credentials.yaml
- token: ${FYERS_STORE_ROOT}/secrets/fyers_token.json
- logs: ${FYERS_STORE_ROOT}/logs/
3) OS user-data dir (Windows example): C:\Users\<user>\AppData\Local\fyers_store\fyers_store\config\fyers_credentials.yaml
Per-file overrides:
- FYERS_CREDENTIALS_YAML
- FYERS_LOGGING_CONFIG_YAML
- FYERS_STATE_YAML
- FYERS_STATE_DB_PATH
- FYERS_STATE_ACCOUNT_ID
Set FYERS_STRICT_CONFIG=1 to require explicit paths (no defaults/fallbacks).
Scenarios:
- Installed package: set FYERS_STORE_ROOT and run fyers-store init-config to copy templates into the runtime root.
- Direct override: point FYERS_CREDENTIALS_YAML at your credentials file.
Config Files
- Credentials:
docs/config/fyers-credentials.md - REST limits:
docs/config/fyers-rest-limits.md - WS settings:
docs/config/fyers-ws.md - Cache:
docs/config/cache.md - State:
docs/config/state.md - Broker:
docs/config/broker.md - Data feed:
docs/config/data-feed.md - Logging:
docs/config/logging.md - NSE calendar:
docs/config/nse-calendar.md
Versioning
Each YAML file requires a top-level version: 1 key. Missing or incorrect versions cause a fast failure with a clear error message.