Use Mojo Perception API as a Python module for Python applications.
If you use pip
, install mojo-perception-python module:
pip install mojoperception
To use properly the API, you need an API key. Just go get one here : https://app.mojo.ai/register
- Create an account
- Create an API Key
- Follow the steps below to use it in your first app.
from mojoperception.mojo_perception_api import MojoPerceptionAPI
Create an object MojoPerceptionAPI:
mojo_perception = MojoPerceptionAPI('<api_key>')
Expiration of MojoPerceptionAPI object is by default 360 seconds. You can set it using "expiration" parameter in constructor.
💡 Have a look to the tutorials section
1️⃣ If you face a
"JsonWebTokenError"
, maybe that's because of the expiration. You can try to increase the user token duration to match your need. Default value of 360 seconds might be too short.