Functions
detect_environment
Detect deployment environment from platform signals.
Checks in order:
1. BENGAL_ENV (explicit over…
detect_environment
def detect_environment() -> str
Detect deployment environment from platform signals.
Checks in order:
- BENGAL_ENV (explicit override)
- Netlify (NETLIFY=true + CONTEXT)
- Vercel (VERCEL=1 + VERCEL_ENV)
- GitHub Actions (GITHUB_ACTIONS=true)
- Default: "local"
Returns
Environment name: "local", "preview", or "production"str
—
get_environment_file_candidates
Get candidate filenames for environment config.
Returns list in priority order (first match wins).
get_environment_file_candidates
def get_environment_file_candidates(environment: str) -> list[str]
Get candidate filenames for environment config.
Returns list in priority order (first match wins).
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
environment |
str |
— | Environment name (e.g., "production") |
Returns
List of candidate filenameslist[str]
—