evarify: Transform and Validate Environment Variables

evarify is a MIT Licensed Python library that provides some simple transformations and validators for environment variables.

For example, let’s say you are writing a daemon that has an environment variable, SEED_SERVERS that expects a comma-separated list of IP addresses. evarify helps ensure that the value is being passed, that it is in the expected format, and it will do the conversion to a list for you

from evarify import ConfigStore, EnvironmentVariable
from evarify.filters.python_basics import comma_separated_to_set, \

settings = ConfigStore({
   'SEED_SERVERS': EnvironmentVariable(
       filters=[comma_separated_to_set, validate_is_boolean_true],

# Assuming our environment variable was ``SEED_SERVERS=,``
>>> settings['SEED_SERVERS']
['', '']

All functions specified in the filters keyword are ran in order against the environment variable’s value. In the example above, we were able to transform the input and validate it quickly and easily.