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.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | db912ad49b9c457c1402665f71e2697d2fde311ae061736870959b5caef9e19a |
|
MD5 | 005e50931fe81f64db40ae2ec27e2ecf |
|
BLAKE2b-256 | 3aec2fa8193adadd861fecb45e1d9781b75ac3a0b4e52f3016f6119b6cfb6706 |
Close
Hashes for PyFoldingAtHomeControl-1.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13984f7d31b13c2d5e0c9bf8c983fbcf64e9dde29a3b222c6038b3fb2f8a2aeb |
|
MD5 | 776a937ac21e390ca181013028c5568a |
|
BLAKE2b-256 | 65fa5ea95a7061371b9be0091dcd84a9a218a59f2f763349cbec0587674cb10d |