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-3.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b33c952f5a6c3141b2ed60bcc4e67b815866a3e934f2182106de9ee0d9cc1c2e |
|
MD5 | 9fd93bf074c81c68abeb686dc6ecd598 |
|
BLAKE2b-256 | 9bbc837da473f6b85b54813f1bb7806233b7f37c651145081712fbc99778ae82 |
Close
Hashes for pyfoldingathomecontrol-3.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f394f84219dacef25a79b9ef971326b3f9c60b6a565f344f8481a6d90e58e4e7 |
|
MD5 | 50dc1e9d66478e7244932efff8f4b36d |
|
BLAKE2b-256 | 1f69f1f4f88cb87ebb372363369edccc4bfc36f9f4f412ca76cf5af7824b2131 |