Data privacy and security starts with safekeeping of sensitive secrets and keys. Whether you’re using API keys or tokens, handling these properly is critical.
Our vault ensures that your keys stay private to you and don’t get shared with anyone else.
Once you’ve saved a key or secret, to use it, you can reference it in any cell following this convention: fabi.secret.MY_SECRET.Here’s an example using a secret to store a key for the Polygon.io API:
Copy
Ask AI
def get_stock(api_key): url = f"https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2025-04-01/2025-05-15?apiKey={api_key}&sort=asc" data = requests.get(url).json().get('results', []) df = pd.DataFrame(data) if not df.empty: df['date'] = pd.to_datetime(df['t'], unit='ms') df = df[['date', 'c']] df.columns = ['date', 'price'] return df# Using the existing API keyapi_key = fabi.secret.POLYGON_KEYstock = get_stock(stock)display(stock)