Fly secrets - Tigris
Fly secrets
Hey, I’m relatively new to Fly and I’m encountering a basic issue. I’m using Tigris for data storage, which sets all database values as Fly secrets by default, so I can’t just copy‑paste them. I need these values to configure my site to send and receive data. I’ve read the docs on secrets, and they only explain how to set them, not how to use them in code. How do I use secrets? Do I need to import something or run a special command? Any help is appreciated.
Secrets are set as environment variables. What language are you using? In Node, you would use process.env, in Ruby ENV, in Python, os.environ, …
I’m using Python. Do I need to import anything? Is it just os.environ[SECRET_NAME]?
os.environ is a dictionary in Python.
import os
os.environ['SECRET_NAME']
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
Tigris
All things Tigris: the Globally Distributed S3-Compatible Object Storage.
220 Members
Fly secrets - Tigris