distro-tools/common/env.py

17 lines
227 B
Python
Raw Permalink Normal View History

2023-02-01 21:37:16 +00:00
"""
Environment variables
"""
import os
def get_env():
return os.environ.get("ENV", "development")
def is_prod():
2023-02-02 02:39:20 +00:00
return get_env() == "production"
2023-02-01 21:37:16 +00:00
def is_k8s():
return os.environ.get("KUBERNETES", "0") == "1"