-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Python binding for Scaphandre. #184
Add Python binding for Scaphandre. #184
Conversation
Hi there - would PR this mean you could install Scaphandre on a machine by doing If so, I'd be happy to contribute some docs on how to use it in python applications. |
Hello @mrchrisadams 👋, Not yet but that's the goal, call Scaphandre Rust codebase from Python 👍 As a follow-up after this PR, we could publish the The documentation is already implemented in this PR so we could include documentation using Sphinx, any contributions on this would be welcomed! |
Hello, @fvaleye, do you plan to use Scaphandre in tracarbon ? |
Hello @demeringo 👋, If this PR is accepted and merged, yes 👍 Using Scaphandre to get electrical power consumption metrics for Tracarbon, the focus will be more on calculating the associated carbon emissions instead of redeveloping or integrating energy consumption sensors in it. This Python binding could be extended by exposing other Rust functions of Scaphandre and several use cases could be activated by having only Python as a requirement. |
ok, thanks @fvaleye. Oh neat - I had no idea Tracarbon existed! We've been doing something similar - we've been building a library for getting carbon intensity from various providers of this data, to use with tooling like Scaphandre, and integrate into anything written in Go (i.e. schedulers like Nomad and K8s, and so on). https://github.com/thegreenwebfoundation/grid-intensity-go I'll look over Tracarbon, as previously I had been looking at tools like codecarbon as a way for python apps to self describe their own resource footprint, but it ends up duplicating some of what Scaphandre already does, and if it's consuming output from Scaphandre, that feels like it reduces duplication of work 👍 |
Hi @fvaleye ! Review is ok ! Merge on the way ! |
Description
pyo3
to call Scaphandre Rust code from Python.PowercapRAPL
as default.init
,is_compatible
andget_energy_consumption_measures
.Documentation