Metadata-Version: 2.3
Name: carbonize
Version: 0.1.0
Summary: A collection of carbon footprint calculators.
License: MIT
Keywords: calculator,co2,co2e,carbon,greenhouse,emissions,footprint
Author: Eneko Illarramendi
Author-email: eneko@illarra.com
Requires-Python: >=3.10
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Other Audience
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Project-URL: Repository, https://github.com/eillarra/carbonize
Description-Content-Type: text/markdown

Carbonize
=========

[![github-tests-badge]][github-tests]
[![github-mypy-badge]][github-mypy]
[![codecov-badge]][codecov]
[![pypi-badge]][pypi]
[![pypi-versions]][pypi]
[![license-badge]](LICENSE)


### Getting started 🛫

```python
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.

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

### Run the tests 🧪

```bash
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:

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


[codecov]: https://codecov.io/gh/eillarra/carbonize
[codecov-badge]: https://codecov.io/gh/eillarra/carbonize/branch/master/graph/badge.svg
[github-mypy]: https://github.com/eillarra/carbonize/actions?query=workflow%3Amypy
[github-mypy-badge]: https://github.com/eillarra/carbonize/workflows/mypy/badge.svg
[github-tests]: https://github.com/eillarra/carbonize/actions?query=workflow%3Atests
[github-tests-badge]: https://github.com/eillarra/carbonize/workflows/tests/badge.svg
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg
[pypi]: https://pypi.org/project/carbonize/
[pypi-badge]: https://badge.fury.io/py/carbonize.svg
[pypi-versions]: https://img.shields.io/pypi/pyversions/carbonize.svg

