Python lib 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-1.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 221a9c16dadbc37946f120eb7d84f2d157df77bfdd67c3397b3173736eaeef9d |
|
MD5 | da191ee5791283838f59bc51079ab1b1 |
|
BLAKE2b-256 | 5b5b3a510087e9636dd565d56e7560baa34f9b8a6de0f9926e9896c5064cec7a |
Close
Hashes for PyFoldingAtHomeControl-1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4f253b9c8fa90186e6f59d0b5097c604b69d715201831da9fb1ba420178e78d |
|
MD5 | 19fbc9ca0250f5a946c552c7d00ee34e |
|
BLAKE2b-256 | d1286db3c3fb6a86466a8a7cd5ebaf63b15682da99bfdd49fd16a91795fd9bef |