Using the Python API Bindings
Last updated
Last updated
The Python SDK is built on top of the Edge Impulse Python API bindings, which is known as the edgeimpulse-api package. These are Python wrappers for all of the web API calls that you are able to use to interact with Edge Impulse projects programmatically (i.e. without needing to use the Studio graphical interface).
The API reference guide for using the Python API bindings can be found here.
The following is a quick demonstration to show you how to use the Python API Bindings. To start, install the edgeimpulse_api package
Note that if you install the edgeimpules Python SDK package, the edgeimpulse-api package will be installed as a dependency.
Now, you can use the edgeimpulse-api package independently to control your data collection, model training, and deployment at a lower level. Create a project in the Edge Impulse Studio, navigate to Dashboard and click on the Keys tab to view your API keys. Double-click on the API key to highlight it, right-click, and select Copy.
Change the api_key
in the script below to match your API key.
When you run the code above, it will print out information about the project associated with the API key supplied. You should see something like the following:
You can use this information to gain insights into your projects, and you can build these insights into your MLOps pipelines. Additionally, this should give you a start on using the Edge Impulse Python API to construct your own pipelines for data collection, training, deployment, and so on.