---
id: envier
version: "0.6.1"
license: MIT License Copyright (c) 2022 Datadog, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record)
license_treatment: permissive
maintenance: active
---
# envier — Python application configuration via the environment
License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI
## Install
pip install envier
uv add envier
poetry add envier
## Description
Envier
Python application configuration from the environment
## Synopsis
Envier is a Python library for extracting configuration from environment
variables in a declarative and (eventually) 12-factor-app-compliant way.
## Usage
The following example shows how to declare the configuration for an application
that uses the `MYAPP_DEBUG`, `MYAPP_SERVICE_HOST` and `MYAPP_SERVICE_PORT`
variables from the environment.
~~~ python
>>> from envier import Env
>>>
>>> class GlobalConfig(Env):
>>> __prefix__ = "myapp"
>>>
>>> debug_mode = Env.var(bool, "debug", default=False)
>>>
>>> service_host = Env.var(str, "service.host", default="localhost")
>>> service_port = Env.var(int, "service.port", default=3000)
>>>
>>> _is_default_port = Env.der(bool, lambda c: c.service_port == c.spec.service_port.default)
>>>
>>> config = GlobalConfig()
>>> config.service_port
3000
>>> config._is_default_port
True
~~~
Configurations can also be nested to create namespaces:
~~~ python
>>> from envier import Env
>>>
>>> class ServiceConfig(Env):
>>> __prefix__ = "service"
>>>
>>> host = Env.var(str, "host",...
## AI interpretation — verify before relying
Envier extracts application configuration from environment variables using a declarative class-based syntax, supporting type conversion, nested namespaces, and derived fields.
Verdict: Envier is a lightweight, actively maintained configuration library with zero runtime dependencies, permissive licensing, and broad Python version support. It is well-suited for 12-factor-compliant applications that need declarative environment-variable binding with type safety.
[View on SkillFed](https://skillfed.io/packages/envier) · [View on PyPI](https://pypi.org/project/envier/)