Install with Python (WSGI)
If you want APImetrics to monitor API calls to a Python web server, use these steps to build the APImetrics adaptor into your application.
This adaptor is currently in beta. Please contact us at [email protected].
Our Observability Adapter for Python (WSGI) applications allows you to monitor your live API traffic from Python, without configuring API calls manually in the APImetrics platform. By deploying this adapter, APImetrics can read API calls that are coming from Python, and automatically build your API Inventory. Once integrated, you can compare your live API traffic against your OAS spec, and set up synthetic endpoint monitoring automatically.
Note: WSGI is compatible with most of the popular Python web frameworks, including Flask, Bottle and web2py.
Include the APImetrics Adaptor in Your Python Application Source
Ensure that nodejs v16 is installed on your system and available on the executable PATH. The current APImetrics adaptor does most of its work in a separate nodejs process.
Download the APImetrics adaptor, darkspark_python_wsgi-0.1.0.tar.gz, and unzip it into your Python project directory.
Add the APImetrics adaptor to your WSGI application, providing an API Key from APImetrics. To create a new API Key for APImetrics by following the tutorial here and choosing Ingress as your Access Level. For example, if you are using Flask, it would look like the following:
from flask import Flask
from darkspark_python_wsgi import darkspark
app = Flask("example")
app.wsgi_app = darkspark(app.wsgi_app, "DARKSPARK-API-KEY")
This completes the setup. The next time you deploy your application, incoming API calls will be captured by the Inventory.
Updated 3 months ago
Add these new API calls to your Schedules & Workflows: