{"id":29922100,"url":"https://github.com/valohai/wattson","last_synced_at":"2025-08-02T08:45:12.158Z","repository":{"id":40392518,"uuid":"479353093","full_name":"valohai/wattson","owner":"valohai","description":"A simple Python library for estimating cloud compute carbon emissions.","archived":false,"fork":false,"pushed_at":"2022-05-26T09:22:38.000Z","size":70,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-01-30T07:00:21.947Z","etag":null,"topics":["amazon-ec2","carbon-emissions","cloud-computing","environment"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valohai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-08T10:52:19.000Z","updated_at":"2023-03-30T10:54:26.000Z","dependencies_parsed_at":"2022-08-02T12:54:06.348Z","dependency_job_id":null,"html_url":"https://github.com/valohai/wattson","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/valohai/wattson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valohai%2Fwattson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valohai%2Fwattson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valohai%2Fwattson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valohai%2Fwattson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valohai","download_url":"https://codeload.github.com/valohai/wattson/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valohai%2Fwattson/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268356088,"owners_count":24237380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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"}},"keywords":["amazon-ec2","carbon-emissions","cloud-computing","environment"],"created_at":"2025-08-02T08:45:11.285Z","updated_at":"2025-08-02T08:45:12.061Z","avatar_url":"https://github.com/valohai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Valohai Wattson 🔌⚡\n\n![PyPI](https://img.shields.io/pypi/v/valohai-wattson)\n![PyPI - MIT License](https://img.shields.io/pypi/l/valohai-wattson)\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/valohai/wattson/CI)\n![Codecov](https://img.shields.io/codecov/c/github/valohai/wattson)\n\n## About\n\nWattson is a Python library for estimating cloud compute carbon emissions.\n\nIt currently supports estimating emissions for a range of Amazon EC2 instances in a variety of regions.\n\n## Usage\nYou can install this package with pip by running `pip install valohai-wattson`.\n\nIf you are currently using AWS instances, you can calculate the carbon emissions for your instances using the following code:\n```\nfrom wattson import estimate_carbon_emissions\n\ntraining_emissions = estimate_carbon_emissions(\n    instance_type='c4.2xlarge',\n    region='us-east-1',\n    hours=1,\n    load_percentage=0.5,\n)\n```\nThe returned value will be of the type `wattson.EmissionsEstimation` and have the following information:\n- `data_license`: The license of the data used to estimate the emissions.\n- `region`: The region the original computation was performed in.\n- `instance_type`: The instance type of the original computation.\n- `avg_load`: The average CPU load during the original computation (defaults to 50% if not specified).\n- `scope_2_co2eq`: The estimated CO2 emissions for the electricity used in the original computation.\n- `scope_3_co2eq`: The estimated CO2 emissions for manufacturing of the device used in the original computation, assuming a 4-year usage.\n- `compensated`: Were any of the emissions of the original computation compensated using e.g. carbon emissions compensation or renewable energy credits.\n- `details`: Any additional details about e.g. the compensation methodology.\n\n## Acknowledgements\n\nThis project uses the [EC2 Carbon Emissions Dataset by Teads Engineering](https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/).\n\n## Licenses\n\n- The library code is **Copyright (c) 2022 Valohai, licensed under the MIT License.**\n- The Teads Engineering EC2 Carbon Emissions Dataset is **licensed under the Creative Commons Attribution 4.0 International License.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalohai%2Fwattson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalohai%2Fwattson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalohai%2Fwattson/lists"}