Documentation

Secrets

Store sensitive data like API keys and passwords securely. Secrets are encrypted and injected into scripts at runtime.

Creating Secrets

  1. Go to Secrets in the sidebar
  2. Click New Secret
  3. Enter a name (e.g., API_KEY)
  4. Enter the secret value
Security: Secrets are encrypted at rest using AES-256. They’re never logged or displayed after creation.

Using Secrets in Scripts

Secrets are available as environment variables:

import os

# Access your secret
api_key = os.environ.get('API_KEY')
db_password = os.environ.get('DB_PASSWORD')

# Use them securely
print(f"Connecting with key: {api_key[:4]}***")

Best Practices

  • Use descriptive names like STRIPE_API_KEY
  • Never print full secret values in logs
  • Rotate secrets periodically
  • Use separate secrets for production vs development