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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 202320ef609fe66b715c06259ed817be50beb4e034802a79d51d5ab491339bbc |
|
MD5 | 485fbdcfba77cc0ab6ec5805c036c278 |
|
BLAKE2b-256 | 05758414e608d10f3b6ddb8d0f9f6929282a87db6ca130af8b48c9c36935dec2 |
Close
Hashes for PyFoldingAtHomeControl-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50d677e838981805c44b86d8cb3e205b9640c477194dc855fc91e70061e9039d |
|
MD5 | ddd943e3dcf254decb0dcc509511821e |
|
BLAKE2b-256 | 084a51607bd4545e3790e5dcf18c5fd1d998a79b88d2817d8858c1a65047537e |