{"id":193503,"name":"GHGPy","description":"An open source greenhouse gas accounting tool that complies with IPCC 2006 and the GHG Protocol.","url":"https://github.com/iclimate/ghgpy","last_synced_at":"2026-06-01T05:02:23.718Z","repository":{"id":231333144,"uuid":"781493054","full_name":"iClimate/ghgpy","owner":"iClimate","description":"Python library for GHG Inventory","archived":false,"fork":true,"pushed_at":"2026-01-10T07:58:48.000Z","size":4804,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-07T01:38:40.639Z","etag":null,"topics":["carbon-dioxide","carbon-emissions","ghg-data","ghg-emissions","python3","sustainability"],"latest_commit_sha":null,"homepage":"https://ghgpy.iclimate.io.vn/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"bkt92/ghgpy","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iClimate.png","metadata":{},"created_at":"2024-04-03T13:42:05.000Z","updated_at":"2026-01-31T06:38:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/iClimate/ghgpy","commit_stats":null,"previous_names":["iclimate/ghgpy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iClimate/ghgpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iClimate%2Fghgpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iClimate%2Fghgpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iClimate%2Fghgpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iClimate%2Fghgpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iClimate","download_url":"https://codeload.github.com/iClimate/ghgpy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iClimate%2Fghgpy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33493273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T14:31:05.219Z","status":"ssl_error","status_checked_at":"2026-05-25T14:31:02.878Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"iClimate","name":"iClimate","uuid":"165917448","kind":"organization","description":"","email":"bkt992@gmail.com","website":null,"location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/165917448?v=4","repositories_count":1,"last_synced_at":"2024-04-03T15:38:26.692Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/iClimate","funding_links":[],"total_stars":0,"followers":1,"following":0,"created_at":"2024-04-03T15:38:26.700Z","updated_at":"2024-04-03T15:38:26.700Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iClimate","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iClimate/repositories"},"packages":[],"commits":{"id":1549048,"full_name":"iclimate/ghgpy","default_branch":"main","total_commits":22,"total_committers":2,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":11.0,"dds":0.045454545454545414,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-01-06T00:12:25.755Z","last_synced_commit":"341e94b5b44eed085e1ce48755016d8b14a49f1b","created_at":"2024-05-29T00:06:07.904Z","updated_at":"2026-01-06T00:12:14.692Z","committers":[{"name":"bkt92","email":"bkt92@yahoo.com.vn","login":"bkt92","count":21},{"name":"Doantruong2212","email":"165918842+Doantruong2212","login":"Doantruong2212","count":1}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/iclimate%2Fghgpy/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-01-07T00:01:21.124Z","repositories_count":6161987,"commits_count":932452534,"contributors_count":36264585,"owners_count":1136181,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"iclimate/ghgpy","html_url":"https://github.com/iclimate/ghgpy","last_synced_at":"2025-08-31T11:34:26.925Z","status":"error","issues_count":0,"pull_requests_count":1,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":275.0,"issues_closed_count":0,"pull_requests_closed_count":1,"pull_request_authors_count":1,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":0.0,"merged_pull_requests_count":1,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2024-05-29T00:06:08.412Z","updated_at":"2025-09-01T15:01:15.476Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/iclimate%2Fghgpy","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/iclimate%2Fghgpy/issues","issue_labels_count":{},"pull_request_labels_count":{},"issue_author_associations_count":{},"pull_request_author_associations_count":{"COLLABORATOR":2},"issue_authors":{},"pull_request_authors":{"bkt92":2},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-01-01T00:00:08.101Z","repositories_count":12540588,"issues_count":35627486,"pull_requests_count":117032129,"authors_count":11079328,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[{"login":"bkt92","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/bkt92"}],"active_maintainers":[]},"events":{"total":{"WatchEvent":1},"last_year":{"WatchEvent":1}},"keywords":["carbon-dioxide","carbon-emissions","ghg-data","ghg-emissions","python3","sustainability"],"dependencies":[],"score":2.4849066497880004,"created_at":"2024-05-29T00:05:57.027Z","updated_at":"2026-06-01T05:02:23.792Z","avatar_url":"https://github.com/iClimate.png","language":"Python","category":"Emissions","sub_category":"Carbon Intensity and Accounting","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# GHGPy (Green House Gas Python)\n\n---\n![Python](https://img.shields.io/pypi/pyversions/ghgpy)\n![PyPI](https://img.shields.io/pypi/v/ghgpy)\n![license](https://img.shields.io/github/license/iClimate/ghgpy)\n\n\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"https://github.com/iClimate/ghgpy/blob/main/branding/logo/ghgpylogofull.jpeg\" width=\"700\"\u003e\n\u003c/h1\u003e\u003cbr\u003e\n\n# GHGPy\n\nA Python package for GHG (Greenhouse Gas) Inventory calculations based on IPCC 2006 Guidelines with 2019 Refinements.\n\n**Carbon inventory, make it easy!**\n\n[![PyPI version](https://badge.fury.io/py/ghgpy.svg)](https://badge.fury.io/py/ghgpy)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n\n## Installation\n\n```bash\npip install ghgpy\n```\n\nFor development:\n```bash\npip install ghgpy[dev]\n```\n\n[pypi: ghgpy](https://pypi.org/project/ghgpy/)\n\n## Requirements / Dependencies\n\nPython 3.11 and up\n\n## Quick Start\n\n```python\nfrom ghgpy import __version__\nfrom ghgpy.data import fuels_database\n\n# Load the emission factors database\ndb = fuels_database(db='xlsx')\n\n# Display available data\nprint(f\"GHGPy v{__version__}\")\nprint(f\"Number of emission factors: {len(db.data)}\")\nprint(db.data.head())\n```\n\n## Features\n\n- **IPCC 2006 Guidelines**: Emission factors from IPCC 2006 with 2019 Refinements\n- **Multiple Sectors**: Support for Energy, IPPU, AFOLU, and Waste sectors\n- **Flexible Database**: Excel-based database with SQLite/MySQL support\n- **Unit Converters**: Built-in energy, weight, and volume conversions\n- **Factory Pattern**: Easy-to-use factory classes for GHG calculations\n- **Uncertainty Support**: Built-in uncertainty data types\n\n## Links\n\n- **Website:** https://iclimate.io.vn\n- **Our services** https://decarbdirect.com/\n- **Documentation:** https://ghgpy.iclimate.io.vn\n- **Source code:** https://github.com/iClimate/ghgpy\n- **Contributing:** https://ghgpy.iclimate.io.vn/devdocs/\n- **Bug reports:** https://github.com/iClimate/ghgpy/issues\n\n---\n\n## Call for Contributions\n\nThe GHGPy project welcomes your expertise and enthusiasm! We're looking for contributors to help with:\n\n- Adding emission factors for additional regions\n- Implementing new calculation methodologies\n- Improving documentation\n- Writing tests\n\n## Basic Usage\n\n### Import library\n\n```python\n    # General factory \n    from src.ghgpy.factory import FactoryGeneral\n    # Uncertainty data type\n    from src.ghgpy.datamodel.fuel import UNumber\n\n    # Database handles\n    from src.ghgpy.datamodel.db import FuelDataHandle, GHGDataHandle, EFDataHandle\n    # Default databases\n    from src.ghgpy.data.fuels import default_fuel_database\n    from src.ghgpy.data.ghg import ghg_gas_data\n    from src.ghgpy.data.efs import s_combustion_energy\n```\n\n### Create a factory\n\n```python\n    # Init the factory class\n    MyFactory = FactoryGeneral(name=\"Hong Ha Textile\", desc = \"Textile production for export!\")\n```\n\n### Connect to the database\n\n```python\n    MyFactory.connection(FuelDataHandle(default_fuel_database),\\\n                EFDataHandle(s_combustion_energy),\\\n                    GHGDataHandle(ghg_gas_data, 'ar6'))\n```\n\n### Add a combussion process in factory\n\n```python\n    MyFactory.add_combustion(name = \"Boiler\", desc = \"Đốt lò hơi\")\n```\n\n### Add another combussion process in factory\n\n```python\n    MyFactory.add_combustion(name = \"Boiler1\", desc = \"Đốt lò than bùn\")\n```\n\n### Add fuels use in these combussion\n\n```python\n    MyFactory.combustion[\"Boiler\"].add('Diesel_Oil', UNumber(value=1000), 'l')\n    MyFactory.combustion[\"Boiler\"].add('Anthracite', UNumber(value=1000), 'kg')\n    MyFactory.combustion[\"Boiler1\"].add('Lignite', UNumber(value=1000), 'kg')\n```\n\n### Add refrigerant use in factory\n\n```python\n    MyFactory.add_refrigerantuse(name='AC', desc='refrigerant use for AC')\n```\n\n### Add amount of specific type of refrigerant\n\n```python\n    MyFactory.refrigerantuse[\"AC\"].add(\"R32\", UNumber(value=10, uncertainty=0), 'kg')\n```\n\n### Electriciy use in factory\n\n```python\n    MyFactory.add_elecuse(name='Office')\n```\n\n### Electriciy consumption\n\n```python\n    MyFactory.elecuse['Office'].add(name='01', amount=UNumber(value=1), unit='MWh', gef=UNumber(value=0.987), force=True)\n```\n\n### Calculate emission\n\n```python\n    MyFactory.emission(scope=1)\n```\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/193503","html_url":"https://ost.ecosyste.ms/projects/193503"}