Skip to main content

A collection of carbon footprint calculators.

Project description

Carbonize

github-tests-badge github-mypy-badge codecov-badge pypi-badge pypi-versions license-badge

Getting started 🛫

from carbonize import Footprint

fp = Footprint()
fp.add_flight(a="BRU", b="BIO", two_way=True)
fp.add_train(distance=100)
print(fp.co2e)  # in kg

### Update the underlying data 📦

The Pickle files in the data folder can be updated using the bin/update_data.py file.

poetry install --sync && python bin/update_data.py

Run the tests 🧪

poetry run pytest --cov=carbonize --cov-report=term

Style guide 📖

Tab size is 4 spaces. Keep lines under 120 characters. Feeling iffy? Run ruff before you commit:

poetry run ruff format . && poetry run ruff check carbonize

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

carbonize-0.1.0.tar.gz (153.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

carbonize-0.1.0-py3-none-any.whl (158.1 kB view details)

Uploaded Python 3

File details

Details for the file carbonize-0.1.0.tar.gz.

File metadata

  • Download URL: carbonize-0.1.0.tar.gz
  • Upload date:
  • Size: 153.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.9 Darwin/24.3.0

File hashes

Hashes for carbonize-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0af7ac7f1191010a7b0efda47429a424fc08a591fcbe9046970ff6c9489da839
MD5 c41ede13f656dbe345f7eb3cecb91751
BLAKE2b-256 aa3aee3b4359c0bd9f85e31c4569383d56ed276a3a1686f8f273e472b43a29a7

See more details on using hashes here.

File details

Details for the file carbonize-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: carbonize-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 158.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.9 Darwin/24.3.0

File hashes

Hashes for carbonize-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a735c5e9316f91746f969049db4637dedf0ea549fede94dea8a3081913f60a5c
MD5 8c462319bdbd19b8890cab9c6e106e16
BLAKE2b-256 7e84e5c36d940a1e77215331d4a4298cfa07b36257362d39c77b11f693cc3d45

See more details on using hashes here.

Supported by

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