Cloverly API Module for Python

carbon-emissions, carbon-offsets, cloverly, python, sustainability
pip install cloverly-python-module==0.7.0


Cloverly Python Module

PyPI version License: MIT

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
Table of Contents (click to open)
  1. Getting started
  2. Resources
  3. API Versioning
  4. Limitations

Getting Started

  1. Log in to your cloverly dashboard and grab your public API key.
  2. Set up a cloverly session using clover.CloverlyResource.activate_session like so:
import cloverly

cloverly.CloverlyResource.activate_session(api_key=API_KEY, version=API_VERSION)
  1. Now you can perform any resource actions as needed in an authenticated section
  2. 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:

cloverly.Estimate.Shipping(_from={"zip":"35209"}, _to={"zip":"94043"})

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 estimate.slug

API Versioning

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