Hello, What’s the mechanism to set and retrieve en...
# ask-the-community
f
Hello, What’s the mechanism to set and retrieve environment variables defined in Flyte?
Copy code
Use cases:
ENV = dev, beta, or prod
Custom constant e.g. PERSIST_BUCKET_PREFIX = 'hbomax-datascience-deployment', -> s3_bucket = f'{PERSIST_BUCKET_PREFIX}-{ENV}'
s
You can set environment variables in the docker image. You can retrieve them using
os.environ.get
.
158 Views