Python library 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-2.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0de714f5d5e836826823b8c659e633802f662b12417c5829739e406421d17e1a |
|
MD5 | 8998acb1de507c3c51c31e0ed3003744 |
|
BLAKE2b-256 | 27ca225119c34866b3a1b54ab98463e8fedb5ba9518cf0f0c75334ffd784c03a |
Close
Hashes for PyFoldingAtHomeControl-2.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 858083959c28c87197c04ed0163c89bd0096b6a0ff859197437fd700a4defaf5 |
|
MD5 | b80587f7fea01bd5aa8aea69f6fada03 |
|
BLAKE2b-256 | c72e7aca45fc64a3c354237bb53b4a8029a27db5306021b3c89d8a2a3812720d |