Skip to main content

Introducing "DitchCarbon", an open-source Python package that allows users to easily call the DitchCarbon API using HTTP requests.

Project description

DitchCarbon Python Package

An open-source Python package that allows users to easily call the DitchCarbon API (v1.0) with type hints etc from within Python.

DitchCarbon is an API that provides information on carbon emissions of different energy sources across the globe. With DitchPy, users can easily retrieve information about the carbon emissions of different energy sources and use it in their own projects.

This package is built on top of the requests library and provides a simple interface for making HTTP requests to the DitchCarbon API. The package includes a set of functions that allow users to retrieve data for specific countries, energy sources, and time periods.

To get started, users can simply install it using pip:

pip install DitchCarbon

Usage

Create an instance of the DitchCarbonClient:

carbon_client = DitchCarbonClient(api_key=API_KEY)

Then call one of the DitchCarbonAPIs endpoints:

carbon_client.get_supplier('Nestle', currency='GBP'))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ditchcarbon-0.1.0.tar.gz (17.8 kB view hashes)

Uploaded Source

Built Distribution

ditchcarbon-0.1.0-py3-none-any.whl (15.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page