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-2.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ce09064a24037845b05b232e2fbc55d4a4c5bd8be5f34be11958b4c8b5daaa4 |
|
MD5 | d3d50005a20151a0e464afdcd8a49e2b |
|
BLAKE2b-256 | 29481e0e6acf77a20dc46f4a78f9a0fa80b2aba27921cd392dc771609c0844f1 |
Close
Hashes for PyFoldingAtHomeControl-2.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dc91d90710f4872873aa896dde78db4a9ebab40829d9e134d989f1952418fec |
|
MD5 | 4adfd0eb1159701e0d1f7f854e342dd5 |
|
BLAKE2b-256 | b7e82959f83fee27c3c41258ae8a4dd23e10731b3eccdfec8a55c3356126ab1f |