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.

๐Ÿ“˜

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.


Whatโ€™s Next

Add these new API calls to your Schedules & Workflows: