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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e247e2d9de57fd50c7e00e7e43833e61e99d1df70e3a18be6a7774a6668e8ef3 |
|
MD5 | ffd0343f3a70f2a6e7286cc8715b8bb4 |
|
BLAKE2b-256 | 9b916154cb34e2328497885ac30f8d6aad7189f47a1efc967a74dd98e2f2eb53 |
Close
Hashes for PyFoldingAtHomeControl-1.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b956ddf2216f91f569f15fadee0a38424d92960a9020fe4984d196968022d75c |
|
MD5 | cc16c3f3f6b9a56caad53552fc9eb55e |
|
BLAKE2b-256 | 55e78e7b6037efa2b7832808fee68fcf95cdf2022a3052a45c584f3916a5201f |