| Key | Purpose | How to obtain |
|---|---|---|
FRED_API_KEY |
FRED macroeconomic data (yield curve, Fed Funds, HY spreads) | Free at fredaccount.stlouisfed.org/apikeys |
- Local development:
.envfile at repo root — gitignored, never committed. Copy.env.exampleto.envand fill in your key. - Streamlit Cloud:
.streamlit/secrets.tomlon the deployment host — not in this repository. Configure under app settings → Secrets.
No API keys or secrets are committed to this repository:
data/demo.db— SQLite containing paper-trade data only, no credentialssrc/,pages/,templates/— no hardcoded API keys or passwords.env— gitignored.streamlit/secrets.toml— gitignored
If you discover a committed secret, rotate the key immediately before taking any other action.
- Revoke the current key at fredaccount.stlouisfed.org/apikeys
- Generate a new key on the same page
- Update your local
.env:FRED_API_KEY=<new-key> - Update the Streamlit Cloud secret: app settings → Secrets → update
FRED_API_KEY - Streamlit Cloud redeploys automatically (typically within 1–2 minutes)
- Verify: open the Macro page and confirm all four indicators populate (CAPE, yield curve, Fed Funds, HY spread)
- Do not commit
.envor.streamlit/secrets.tomlunder any circumstances - The
python-dotenvlibrary loads.envautomatically in local dev; on Streamlit Cloud,st.secretsis used instead (seesrc/config.py) - If a pull request accidentally includes a secret, close it immediately, rotate the key, and use
git filter-repoor BFG Repo Cleaner to scrub the history before force-pushing