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.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 955aa5aeacc0d93aa9c14a9633fccce6e120e16e343f9577fb575f3dd0d2d2e8 |
|
MD5 | 01dd6badd03b7a75b4d6dc3861e74c67 |
|
BLAKE2b-256 | c333875914ee2c1cf950af1e9b9ccea8a718168004f2a06c743ded801ee68568 |
Close
Hashes for PyFoldingAtHomeControl-1.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a14587835203d10f1e3fc3a062b46ceed1417927646262084f5a6a043c11d1b |
|
MD5 | b6179b40d9604084e276e104ffe46d0a |
|
BLAKE2b-256 | 057722b9184322aae1f07097af058d0f1a28d1a20239a909974d168d11fbc821 |