Cloverly Python Module
The Cloverly API Python module
You should be signed up on the Cloverly Dashboard so that you can create and manage cloverly resources.
To easily install or upgrade to the latest release, use pip.
pip3 install --upgrade cloverly-python-module
- Log in to your cloverly dashboard and grab your public API key.
- Set up a cloverly session using
import cloverly cloverly.CloverlyResource.activate_session(api_key=API_KEY, version=API_VERSION)
- Now you can perform any resource actions as needed in an authenticated section
- It's generally best practice to clear your session once you're done like so:
As of 06/08/2021, there are 4 key resource classes:
The resource classes are what allow you to create, update, delete and list resource endpoints. Resources also implement subpoints in accordance with Cloverly's API documentation. For example, the /estimates/shipping endpoint can be accessed via the Shipping sub class:
The above code snippet would return an instance of the Estimate class. All attributes returned in the expected payload would be able to be accessed as instance attributes, like
Versioning of the API can be passed to the python module in the session activation. Essentially, this populates the following in an API url:
Currently there is no support for:
- asynchronous requests
- persistent connections