Skip to main content


ditchcarbon-python

PyPI PyPI - Downloads PyPI - License PyPI - Python Version GitHub code size in bytes Code style

What is it?

ditchcarbon-python is the official Python wrapper for the DitchCarbon API. DitchCarbon calculates the carbon impact of almost anything using a combination of GHG protocol approved calculations and an unparalleled database of company and product disclosures.

Where to get it?

You can install the library via PyPI (hosted here):

pip3 install ditchcarbon-python

The source code is currently hosted on GitHub, here.

How to use it?

First, import and initialise the library with your API token:

from ditchcarbon_python import Client
ditchcarbon = Client(token="YOUR_TOKEN")

Then, use it:

# Activities
ditchcarbon.activities.retrieve(1)
ditchcarbon.activities.retrieve_many(**params)
ditchcarbon.activities.retrieve_assessment(1, **params)
ditchcarbon.activities.retrieve_categories(**params)

# Categories
ditchcarbon.categories.search(**params)

# Expenses
ditchcarbon.expenses.calculate_emissions(**params)

# Products
ditchcarbon.products.calculate_emissions(**params)

# Servers
ditchcarbon.servers.find(**params)
ditchcarbon.servers.retrieve(1)
ditchcarbon.servers.calculate_emissions(1, **params)

# Suppliers
ditchcarbon.suppliers.calculate_emissions(**params)

Documentation and Help

View our API reference here. For usage questions, feel free to contact us here.

Metadata

Release files for ditchcarbon-python 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ditchcarbon-python 0.1.2
File Size Uploaded Provenance Actions
ditchcarbon-python-0.1.2.tar.gz 6.5 kB Without provenance Details for ditchcarbon-python-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ditchcarbon-python 0.1.2
File Interpreter ABI Platform Actions
ditchcarbon_python-0.1.2-py3-none-any.whl Python 3 none any Details for ditchcarbon_python-0.1.2-py3-none-any.whl

Total release size: 14.0 kB

Release files / ditchcarbon-python-0.1.2.tar.gz

Download URL ditchcarbon-python-0.1.2.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
171d3eaf9abdbc0c94fb178dd26ad27a90691202f78ea565f2964d65fb28f2ed
BLAKE2b-256 checksum
How to use checksums
6f499068563b3a3bb802c01700caf35fba4439a828581193e04c5f2aaeae850e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.2

Release files / ditchcarbon_python-0.1.2-py3-none-any.whl

Download URL ditchcarbon_python-0.1.2-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6bba2e8c325dacedc51ffff00a14d66b88ca4217e3d41821abd7fd796da7516
BLAKE2b-256 checksum
How to use checksums
fcea2a36b31ba762e9d66fb7ee474cbe7f084e2e398a2e3b5448760ec7262725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.2

Security for ditchcarbon-python 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page