SDKs
Flask
SDK to integrate TraceReq in server-side applications running on Python’s flask framework
Installation
Run pip
to add tracereq
to your project
pip install --upgrade tracereq-sdk
Note: You need Python 3.6+.
Configuration
Import the SDK and initialise once your Flask app is setup
from flask import Flask
import tracereq_sdk
app = Flask(__name__)
# initialise to start tracking API requests automatically
tracereq_sdk.init(api_key='xxx-xxx',
flask_app=app.wsgi_app
)
This example demonstrates how to use the TraceReq Python SDK with a Flask application.
The SDK starts tracing all incoming and outgoing requests and responses within this Flask app
See also:
- Explore the Python SDK