Python library to get stats from your Folding@Home Clients
Project description
PyFoldingAtHomeControl
Python library to get stats from your Folding@Home Clients
Installation
pip install PyFoldingAtHomeControl
Usage
import asyncio
from FoldingAtHomeControl import FoldingAtHomeController
from FoldingAtHomeControl import PyOnMessageTypes
def callback(message_type, data):
print(f"callback for: {message_type}: ", data)
async def cancel_task(task_to_cancel):
task_to_cancel.cancel()
await task_to_cancel
if __name__ == "__main__":
Controller = FoldingAtHomeController("localhost")
Controller.register_callback(callback)
loop = asyncio.get_event_loop()
task = loop.create_task(Controller.start())
try:
loop.run_until_complete(task)
except KeyboardInterrupt:
pass
finally:
print("Cancelling task")
try:
loop.run_until_complete(cancel_task(task))
except asyncio.CancelledError:
print("Closing Loop")
loop.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pyfoldingathomecontrol-3.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d485fa4a6fa3696ad72f9918d9bed87071cf006f6f803ee4c365ac1dd6d50ddf |
|
MD5 | b38e5a864136c878e1b6a9c406e2afdb |
|
BLAKE2b-256 | 90c6aa1f450b320adbe5000102862648cb09530f4c4d02d284faee7f2e4495e9 |
Close
Hashes for pyfoldingathomecontrol-3.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a8647fd22086ca5ae73dfc4161db270e54c4e7e8d65a5197b2f3c0efca09bc7 |
|
MD5 | d507011c1e0fa9ed791351ae41ea3496 |
|
BLAKE2b-256 | 741f10ecb1b4cc38276afca186f5f0301ba35d3112dd9f03576fe20a86daf61d |