Carbon Aware SDK
Helps you build the carbon aware software solutions with the intelligence to use the greenest energy sources.
https://github.com/Green-Software-Foundation/carbon-aware-sdk
Category: Consumption
Sub Category: Computation and Communication
Keywords from Contributors
sustainability green-software climate sustainable-software training green-computing community simulations transformer software-patterns
Last synced: about 19 hours ago
JSON representation
Repository metadata
Carbon-Aware SDK
- Host: GitHub
- URL: https://github.com/Green-Software-Foundation/carbon-aware-sdk
- Owner: Green-Software-Foundation
- License: mit
- Created: 2021-09-22T23:10:41.000Z (over 3 years ago)
- Default Branch: dev
- Last Pushed: 2025-04-22T07:11:44.000Z (6 days ago)
- Last Synced: 2025-04-25T13:49:19.835Z (3 days ago)
- Language: HTML
- Homepage: https://carbon-aware-sdk.greensoftware.foundation/
- Size: 13.7 MB
- Stars: 527
- Watchers: 24
- Forks: 103
- Open Issues: 19
- Releases: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
README.md
sidebar_position: 2
Carbon Aware SDK
Carbon aware software does more when it can leverage greener energy sources, and less when the energy CO2 emissions are higher.
The Carbon Aware SDK is a toolset to help you measure the carbon emissions of your software, in turn helping you measure and reduce your software's carbon emissions, and choose when and where you run your software to make it greener.
By knowing the carbon emissions of the energy that powers your applications, you and your organisation can leverage greener energy sources to reduce your CO2 emissions by:
- Building AI models when carbon emissions are lower
- Deploying software into the cloud in locations that have greener energy sources
- Running software updates at greener energy time windows
- Using data to run hypothetical models to understand how you could start driving impact and reduce emissions, drive business cases for change, and create a greener future.
Within the Green Software Foundations Theory of Change, we look at 3 pillars, that being Knowledge, Tech Culture, and Tooling as focus areas to drive this change. The Carbon Aware SDK at its core sits firmly in the Tooling pillar, and also supports the other pillars, providing Knowledge through emissions data to inform change, and being core enabler for the Tech Culture for building carbon aware software.
Companies including UBS and Vestas have already deployed the Carbon Aware SDK to build greener software, and you can too!
Getting Started Overview
Head on over to the Getting Started Overview Guide to get up and running.
Get started on creating sustainable software innovation for a greener future
today!
How Does This Work?
You can reduce the carbon footprint of your application by just running things
at different times and in different locations. That is because not all
electricity is produced in the same way. Most is produced through burning fossil
fuels, some is produced using cleaner sources like wind and solar.
When software does more when the electricity is clean and do less when the
electricity is dirty, or runs in a location where the energy is cleaner, we call
this carbon aware software.
The Carbon Aware SDK helps you build the carbon aware software solutions with
the intelligence to use the greenest energy sources. Run them at the greenest
time, or in the greenest locations, or both! Capture consistent telemetry and
report on your emissions reduction and make informed decisions.
With the Carbon Aware SDK you can build software that chooses to run when the
wind is blowing, enable systems to follow the sun, moving around the world to
where energy is the greenest, and create tools that give insights and help
software innovators to make greener software decisions. All of this helps reduce
carbon emissions.
What is the Carbon Aware SDK?
At its core the Carbon Aware SDK is a WebApi and Command Line Interface (CLI) to
assist in building carbon aware software. The functionality across the CLI and
WebApi is identical by design.
You can use these to attain carbon emissions data for the energy that powers your applications, and in turn programmatically make greener decisions in your software.
The WebApi
The WebApi is the preferred deployment within large organisations to centralise
management and increase control and auditability, especially in regulated
environments. It can be deployed as a container for easy management, and can be
deployed alongside an application within a cluster or separately.
The CLI
The CLI tends to be handy for legacy integration and non-cloud deployments,
where a command-line can be used. This tends to be common with legacy DevOps
pipelines to drive deployment for integration testing where you can test your
deployment in the greenest location.
Who Is Using the Carbon Aware SDK?
The Carbon Aware SDK is being used by large and small companies around the
world. Some of the world’s biggest enterprises and software companies, through
to start-ups. Both UBS and Vestas have used the SDK, with further details over on the adopters overview.
Machine Learning (ML) workloads are a great example of long running compute
intensive workloads, that often are also not time critical. By moving these workloads to a different time, the carbon emissions from the ML training can be reduced by up to 15%, and by moving the location of the training this can be
reduced even further, at times by up to 50% or more.
What does the SDK/API provide that 3rd party data providers such as WattTime or ElectricityMaps do not?
Many of the benefits tend to relate to removing the tight coupling of an
application from the 3rd party data source it is using, and allow the
application to focus on the sustainability impact it is looking to drive. This
abstraction allows for changing of data providers, data provider aggregation,
centralised management, auditability and traceability, and more.
Collaborative Effort
The Carbon Aware SDK is a collaborative effort between companies around the
world, with the intention of providing a platform that everyone can use. This
means the API will be striving towards what solves the highest impact issues
with diverse perspectives from these organisations and contributors.
Standardization
Something we are driving with the Carbon Aware SDK is towards standardisation of
the interface into these data providers. This ultimately will help to drive SCI
calculations in the future, and also helps to drive innovation. The 3rd party
API’s do differ, and the results can vary in units, from lbCO2/kWh to gCO2/Wh.
The Carbon Aware SDK will take care of all conversions to a standardised
gCO2/kWh, which becomes increasingly valuable with aggregated data sources.
Standardisation also helps drive innovation. For example, if a 3rd party
develops tools to scale Kubernetes clusters based on emissions, they can build
against the Carbon Aware SDK. If you want to use this 3rd party tool, the SDK
allows the tool to plug in your choice of data providers, not their choice
of data provider. In this way the standardisation drives innovation and
flexibility of choice.
The intention is to have other compatible tooling and software that leverages
the Carbon Aware SDK to obtain emissions data, while being agnostic to the data
provider.
Centralised secret and key management
The ability to manage keys to 3rd party API’s can be centralised with the Carbon
Aware API. This means that any changes to keys or rotation can be done in a
centralised and controlled manner without exposing the keys to application
development teams.
It also can be upgraded across all applications within an organisation when
centralised, with new data sources being added without consuming applications to
make any changes.
In addition, the need for the Carbon Aware SDK is something that has been
identified by some of the largest enterprises when looking to drive innovation
within their own organisations by centralising the capability within their
business, creating green software engineering practices and providing the API
internally across their organisation.
Auditability
Due to the API being centralised, this gives you the ability to audit a
controlled environment for when decisions are made. With increasing regulatory
need, the ability to prove sustainability actions and impact will need to be
from highly trusted sources, and having centralised management provides this
capability.
Aggregated Sources
A feature we have in the roadmap is the ability to aggregate data sources across
multiple providers. Different data providers have different levels of
granularity depending on region, and it may be that data provider A is preferred
in Japan, while data provider B is preferred in US regions.
Similarly, you may have your own data for your data centres that you would
prefer to use for on premises workloads, which you can combine in aggregate with
3rd party data providers.
Is it possible to retrieve energy mix information from the SDK?
Energy mix (the percentages that are from different energy sources i.e. coal,
nuclear, wind, gas, solar, tidal, hydro etc) is not provided in the API to date.
This may be a feature we will consider in the future. The SDK provides emissions
percentage information only at the moment.
Contributing
The Carbon Aware SDK is open for contribution! Want to contribute? Check out the
contribution guide.
Green Software Foundation Project Summary
The Carbon Aware SDK is a project as part of the
Green Software Foundation (GSF) and the GSF
Open Source Working Group.
Appointments
The following are those who are currently actively working on the SDK and have made significant ongoing contributions.
- Chair/Project lead - Vaughan Knight (Microsoft)
- Senior Technical Program Manager - Sophie Trinder (Green Software Foundation)
- Principal Contributor - Szymon Duchniewicz (Avanade)
- Principal Contributor - Dan Benitah (Avanade)
- Contributor - Bill DeRusha (Microsoft)
- Contributor - Yasumasa Suenaga (NTT Data)
- Contributor - Damien Roux (NTT Data)
Please note that there are many others who have made contributions over time - these are all greatly appreciated, the project would not be where it is today without everyone's support. Thank you.
GSF Project Scope
For developers to build carbon aware software, there is a need for a unified
baseline to be implemented. The Carbon Aware Core SDK is a project to build a
common core, that is flexible, agnostic, and open, allowing software and systems
to build around carbon aware capabilities, and provide the information so those
systems themselves become carbon aware.
The Carbon Aware Core API will look to standardise and simplify carbon awareness
for developers through a unified API, command line interface, and modular
carbon-aware-logic plugin architecture.
Owner metadata
- Name: Green Software Foundation
- Login: Green-Software-Foundation
- Email:
- Kind: organization
- Description: The Green Software Foundation is a non-profit with the mission to create a trusted ecosystem of people, standards, tooling and best practices for green software
- Website: https://greensoftware.foundation
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/84547728?v=4
- Repositories: 22
- Last ynced at: 2023-03-03T23:14:56.837Z
- Profile URL: https://github.com/Green-Software-Foundation
GitHub Events
Total
- Create event: 12
- Release event: 2
- Issues event: 76
- Watch event: 56
- Delete event: 3
- Issue comment event: 173
- Push event: 31
- Pull request review comment event: 11
- Pull request event: 32
- Pull request review event: 33
- Fork event: 6
Last Year
- Create event: 12
- Release event: 2
- Issues event: 76
- Watch event: 56
- Delete event: 3
- Issue comment event: 173
- Push event: 31
- Pull request review comment event: 11
- Pull request event: 32
- Pull request review event: 33
- Fork event: 6
Committers metadata
Last synced: 7 days ago
Total Commits: 1,058
Total Committers: 53
Avg Commits per committer: 19.962
Development Distribution Score (DDS): 0.809
Commits in past year: 139
Committers in past year: 9
Avg Commits per committer in past year: 15.444
Development Distribution Score (DDS) in past year: 0.597
Name | Commits | |
---|---|---|
Vaughan Knight | v****n@v****m | 202 |
Dan Benitah | b****w@g****m | 107 |
Yasumasa Suenaga | s****a@o****m | 100 |
Jennifer Madiedo | j****o@o****m | 96 |
Kanishk Tantia | k****7@g****m | 87 |
Priti | p****k@m****m | 69 |
Juan Zuluaga | j****g@m****m | 52 |
Bill DeRusha | 4****a | 49 |
Dan Balma | d****a@m****m | 46 |
Kristjana Popovski | k****s@m****m | 28 |
Yassine EL GHALI | y****i@g****m | 26 |
Fabio Turati | f****i@n****m | 21 |
Szymon Duchniewicz | s****z@a****m | 14 |
Peter Lasne | p****e@i****m | 13 |
Sean Mcilroy | s****y@o****g | 10 |
tkuramoto33 | 7****3 | 10 |
danuw | d****w@v****o | 9 |
Srinivasan | s****n@m****m | 9 |
George | 1****s | 8 |
Robin TROESCH | 3****m | 8 |
Dylan Hall | d****7@g****m | 7 |
Margaret | i****t@g****m | 7 |
Sean Mcilroy | s****y@l****g | 7 |
omahs | 7****s | 6 |
Osama Jandali | o****y@g****m | 6 |
Richard Jackson | j****r@p****e | 5 |
Sophie Trinder | 1****n | 5 |
nttDamien | 1****n | 5 |
JasonLuuk | 9****k | 4 |
rinikeda | r****w@g****m | 4 |
and 23 more... |
Committer domains:
- microsoft.com: 8
- vmware.com: 1
- codecraft.tv: 1
- greensoftware.foundation: 1
- jp.ibm.com: 1
- buchananwp.com: 1
- robertmay.org: 1
- pm.me: 1
- linuxfoundation.org: 1
- volto.io: 1
- omaorg.org: 1
- iname.com: 1
- avanade.com: 1
- nttdata.com: 1
- oss.nttdata.com: 1
- vaughanknight.com: 1
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 231
Total pull requests: 163
Average time to close issues: 3 months
Average time to close pull requests: about 1 month
Total issue authors: 38
Total pull request authors: 31
Average comments per issue: 4.73
Average comments per pull request: 2.74
Merged pull request: 139
Bot issues: 0
Bot pull requests: 1
Past year issues: 89
Past year pull requests: 48
Past year average time to close issues: 20 days
Past year average time to close pull requests: 13 days
Past year issue authors: 12
Past year pull request authors: 10
Past year average comments per issue: 3.36
Past year average comments per pull request: 1.31
Past year merged pull request: 41
Past year bot issues: 0
Past year bot pull requests: 1
Top Issue Authors
- danuw (85)
- Sophietn (41)
- Willmish (28)
- vaughanknight (16)
- YaSuenag (13)
- MartinDawson (3)
- trent-s (3)
- tiwatsuka (3)
- dohafernandez (3)
- joecus1 (2)
- ng-druid (2)
- jacksorjacksor (2)
- georgekosmidis (2)
- jbdietrich (2)
- helayoty (2)
Top Pull Request Authors
- danuw (38)
- YaSuenag (31)
- vaughanknight (19)
- JenMadiedo (10)
- pritipath (7)
- Willmish (6)
- tiwatsuka (5)
- joecus1 (4)
- Kpopovs1 (4)
- juzuluag (4)
- in4margaret (4)
- JasonLuuk (3)
- jacksorjacksor (3)
- helayoty (3)
- unitrium (2)
Top Issue Labels
- Agenda (95)
- bug (53)
- stale (43)
- documentation (13)
- 1.3 (10)
- vNext (8)
- for discussion (8)
- devops (8)
- v1.2 (5)
- v1.1 (3)
- ADR (3)
- v1.5 (3)
- v1.6 (3)
- help wanted (2)
- v1.7 (2)
- v1.6.1 (2)
- v1.4 (1)
- v1.5.1 (1)
- enhancement (1)
- v1.8 (1)
- v1.7.1 (1)
Top Pull Request Labels
- v1.6 (9)
- 1.3 (9)
- devops (8)
- v1.2 (7)
- v1.8 (7)
- v1.5 (7)
- v1.7 (6)
- v1.6.1 (4)
- documentation (4)
- vNext (3)
- stale (3)
- for discussion (3)
- v1.4 (3)
- bug (2)
- v1.1 (2)
- help wanted (1)
- Ready for Review (1)
- v1.6.2 (1)
Dependencies
- actions/checkout v2 composite
- actions/download-artifact v2 composite
- actions/setup-dotnet v1 composite
- actions/upload-artifact v2 composite
- azure/webapps-deploy v2 composite
- Green-Software-Foundation/carbon-aware-sdk sdkCLI-githubaction composite
- actions/checkout v3 composite
- Dockerfile * docker
- mcr.microsoft.com/dotnet/sdk 6.0 build
- mcr.microsoft.com/dotnet/runtime 6.0 build
- mcr.microsoft.com/dotnet/sdk 6.0 build
- mcr.microsoft.com/dotnet/aspnet 6.0 build
- mcr.microsoft.com/dotnet/sdk 6.0 build
- mcr.microsoft.com/dotnet/aspnet 6.0 build
- mcr.microsoft.com/dotnet/sdk 6.0 build
- jakarta.annotation:jakarta.annotation-api 1.3.5 provided
- com.google.code.findbugs:jsr305 3.0.2
- com.google.code.gson:gson 2.9.0
- com.squareup.okhttp3:logging-interceptor 4.9.3
- com.squareup.okhttp3:okhttp 4.9.3
- io.gsonfire:gson-fire 1.8.5
- io.swagger:swagger-annotations 1.6.5
- javax.ws.rs:javax.ws.rs-api 2.1.1
- javax.ws.rs:jsr311-api 1.1.1
- org.apache.commons:commons-lang3 3.12.0
- org.openapitools:jackson-databind-nullable 0.2.3
- Microsoft.AspNetCore.Http.Abstractions 2.2.0
- Microsoft.Extensions.Configuration 6.0.1
- Microsoft.Extensions.DependencyInjection 6.0.0
- Microsoft.Extensions.Hosting 6.0.1
- Microsoft.Net.Http.Headers 2.2.8
- System.ComponentModel.Composition 6.0.0
- WireMock.Net 1.5.6
- Microsoft.AspNetCore.Http.Abstractions *
- Microsoft.Extensions.Configuration *
- Microsoft.Extensions.DependencyInjection *
- Microsoft.Extensions.Hosting *
- System.ComponentModel.Composition *
- coverlet.collector * development
- Microsoft.NET.Test.Sdk *
- Moq *
- NUnit *
- NUnit3TestAdapter *
- coverlet.msbuild *
- Microsoft.Extensions.Configuration *
- Microsoft.Extensions.DependencyInjection *
- OpenTelemetry 1.4.0-rc.1
- OpenTelemetry.Exporter.Console 1.4.0-rc.1
- OpenTelemetry.Instrumentation.Http 1.0.0-rc9.10
- System.CommandLine 2.0.0-beta4.22272.1
- Microsoft.NET.Test.Sdk *
- Moq *
- NUnit *
- NUnit3TestAdapter *
- Microsoft.NET.Test.Sdk *
- Moq *
- NUnit *
- NUnit3TestAdapter *
- WireMock.Net *
- Microsoft.AspNetCore.Http.Abstractions *
- Microsoft.Extensions.Configuration *
- Microsoft.Extensions.DependencyInjection *
- Microsoft.Extensions.Hosting *
- Microsoft.Extensions.Http *
- Microsoft.Net.Http.Headers *
- System.ComponentModel.Composition *
- coverlet.collector * development
- Microsoft.NET.Test.Sdk 17.1.0
- Moq 4.17.2
- Moq.Contrib.HttpClient 1.4.0
- NUnit 3.13.3
- NUnit.Analyzers 3.3.0
- NUnit3TestAdapter 4.2.1
- coverlet.msbuild *
- coverlet.collector * development
- Microsoft.NET.Test.Sdk *
- Moq *
- NUnit *
- NUnit3TestAdapter *
- coverlet.msbuild *
- WireMock.Net *
- Microsoft.Net.Http.Headers 2.2.8
- WireMock.Net 1.4.43
- coverlet.collector 3.1.2 development
- Microsoft.NET.Test.Sdk 16.11.0
- Moq 4.17.2
- Moq.Contrib.HttpClient 1.4.0
- NUnit 3.13.2
- NUnit3TestAdapter 4.0.0
- coverlet.msbuild *
- coverlet.collector * development
- Microsoft.NET.Test.Sdk *
- Moq *
- NUnit *
- NUnit3TestAdapter *
- coverlet.msbuild *
- Newtonsoft.Json 9.0.1
- Newtonsoft.Json 9.0.1
- Microsoft.ApplicationInsights.AspNetCore 2.20.0
- Microsoft.VisualStudio.Azure.Containers.Tools.Targets 1.14.0
- OpenTelemetry 1.4.0-beta.3
- OpenTelemetry.Exporter.Console 1.4.0-beta.3
- OpenTelemetry.Extensions.Hosting 1.0.0-rc9.9
- OpenTelemetry.Instrumentation.AspNetCore 1.0.0-rc9.9
- OpenTelemetry.Instrumentation.Http 1.0.0-rc9.9
- Swashbuckle.AspNetCore 6.2.3
- Swashbuckle.AspNetCore.Annotations 6.4.0
- coverlet.collector * development
- Microsoft.AspNetCore.Mvc.Testing 6.0.0
- Microsoft.NET.Test.Sdk *
- Moq *
- NUnit *
- NUnit3TestAdapter *
- WireMock.Net *
- coverlet.msbuild *
- coverlet.collector * development
- Microsoft.NET.Test.Sdk *
- Moq *
- NUnit *
- NUnit3TestAdapter *
- coverlet.msbuild *
- Microsoft.AspNetCore.Http.Abstractions 2.2.0
- Microsoft.Extensions.Configuration 6.0.1
- Microsoft.Extensions.DependencyInjection 6.0.0
- Microsoft.Extensions.Hosting 6.0.1
- Microsoft.Net.Http.Headers 2.2.8
- System.ComponentModel.Composition 6.0.0
- WireMock.Net 1.5.6
- coverlet.collector 3.1.2 development
- Microsoft.NET.Test.Sdk 17.1.0
- Moq 4.17.2
- NUnit 3.13.3
- NUnit.Analyzers 3.3.0
- NUnit3TestAdapter 4.2.1
- coverlet.msbuild 3.1.2
- dotenv.net 3.1.1
- actions/stale v5 composite
- DavidAnson/markdownlint-cli2-action v9 composite
- actions/checkout v2 composite
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/setup-dotnet v1 composite
- actions/setup-dotnet v2 composite
- actions/upload-artifact v1 composite
- codecov/codecov-action v2 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/init v2 composite
- actions/delete-package-versions v4 composite
- docker/build-push-action v4.0.0 composite
- docker/login-action v2.1.0 composite
- docker/metadata-action v4.3.0 composite
- docker/setup-buildx-action v2 composite
- docker/setup-qemu-action v2 composite
- docker/build-push-action v4.0.0 composite
- docker/login-action v2.1.0 composite
- docker/metadata-action v4.3.0 composite
- docker/setup-buildx-action v2 composite
- docker/setup-qemu-action v2 composite
- base latest build
- build latest build
- mcr.microsoft.com/azure-functions/dotnet 4.0 build
- mcr.microsoft.com/dotnet/sdk 6.0 build
- Microsoft.AspNetCore.Http.Abstractions 2.2.0
- Microsoft.Azure.Functions.Extensions 1.1.0
- Microsoft.Extensions.Configuration 6.0.1
- Microsoft.Extensions.DependencyInjection 6.0.0
- Microsoft.Extensions.Hosting 6.0.1
- Microsoft.NET.Sdk.Functions 4.0.1
- Microsoft.Net.Http.Headers 2.2.8
- System.ComponentModel.Composition 6.0.0
- WireMock.Net 1.5.6
- WireMock.Net *
- Microsoft.Extensions.DependencyInjection 7.0.0
- Microsoft.Extensions.Http 6.0.0
- Microsoft.NET.Test.Sdk 16.11.0
- Moq 4.17.2
- Moq.Contrib.HttpClient 1.4.0
- NUnit 3.13.2
- NUnit3TestAdapter 4.0.0
- coverlet.collector 3.1.0
- actions/checkout v3 composite
- docker/login-action v2.1.0 composite
Score: 10.272910889297027