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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | db485be94b6176484b8a7b5a5cc0a2a5aa298be1f4d014d946641837e3ecfda3 |
|
MD5 | 52a7d7720a146e319d3a6a5687ff29aa |
|
BLAKE2b-256 | 7511263ae7653bf2b3a74391e6f3f75ba7fc1b32100c877a3e93c0ff11652e3d |
Close
Hashes for PyFoldingAtHomeControl-1.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8f623772088c61654bcacd153cf8516af90bba5e6a29096812ad8c3c9c0f00e |
|
MD5 | 40a918b78e300224b2ff70c0422c4c73 |
|
BLAKE2b-256 | caa1a94a127bdaf8fbbbd5617b41a1f3c2b260c87669d836ec221cb0dc6a0e8f |