Python lib to get stats from your Folding@Home clients.
Project description
PyFoldingAtHomeControl - BETA
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.run())
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-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca7d058a7d2f31a4b756951caabde122d3ebc3b480533a5cd8faace5473ad144 |
|
MD5 | 9cace06e7c1d3d1f772b079b5d0a3499 |
|
BLAKE2b-256 | 08bd5beffe1f670a1d02f27f9e49ebd929a0df5c34a9b96329065e1cfdfce3f5 |
Close
Hashes for PyFoldingAtHomeControl-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7fc1c76d2665c49f7cde333ce74dd83e2bd06d4c66cf5c1bd94bc4b028dbddb |
|
MD5 | c9f74e7158d3807e5bf2235360b4a61b |
|
BLAKE2b-256 | 5b1aa434fd9172cdbca736f93c46b61d7388c3f4fd1719181dd4380cad9541b1 |