Treblle for Python

Learn how to get started with Treblle using our Python package in less than 2 minutes on any new or existing API

Step 1

Install Treblle via PyPI

Run command

pip install treblle

You can ⭐ our Github repo to stay up to date with new updates

View on Github

Go to Step 2
Step 2

Enable Treblle on your API

Edit setting.py

# Load the Treblle SDK to your Python app
INSTALLED_APPS = [
'treblle',
]
 
# Enable the Treblle SDK middleware
MIDDLEWARE_CLASSES = [
'treblle.middleware.TreblleMiddleware',
]
Go to Step 3
Step 3

Configure the Treblle SDK

Edit your setting.py

# Initialize Treblle in your app
TREBLLE_INFO = {
'api_key': os.environ.get('TREBLLE_API_KEY'),
'project_id': os.environ.get('TREBLLE_PROJECT_ID')
}

HEADS UP: You need to create an account to get your API KEY and PROJECT ID

Go to Step 4
Done

🎉 You're all set! 🎉

You and your team just got these amazing features:

  • Real-time API monitoring
  • Auto-generated API documenation
  • API analytics
  • Powerfull request search and filtering
  • 1-click API testing
  • Real-time problem detection
  • OpenAPI Specification support
  • Location based request tracking
  • Smart URL parameters detection
  • and many more..
Optional

Configuration params

Mask sensitive data

TREBLLE_INFO = {
'api_key': os.environ.get('TREBLLE_API_KEY'),
'project_id': os.environ.get('TREBLLE_PROJECT_ID'),
'hidden_keys': ["secret", "private", "user_ssn"] // Params to mask
}

PRO TIP: Data is masked before it even leaves your server

Need help getting started with Treblle on your API?

Book a meeting