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 logger_callback(data):
print("callback:", data)
async def cancel_task(task_to_cancel):
task_to_cancel.cancel()
await task_to_cancel
if __name__ == '__main__':
Controller = FoldingAtHomeController("localhost")
for message_type in PyOnMessageTypes:
Controller.register_callback_for_message_type(message_type.value, logger_callback)
loop = asyncio.get_event_loop()
task = loop.create_task(Controller.run())
try:
loop.run_forever()
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.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b53c33496e2e16834b09494b4e3af4e02ae9d5345701c56f1dcd1a92f1cc79b |
|
MD5 | 70e128dab84e4342da74cba3e1fa7a6a |
|
BLAKE2b-256 | c5994245d7964a40c1d0f82f6de615332bd3689cf00e950445bfbc9f30f5660e |
Close
Hashes for PyFoldingAtHomeControl-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5091a2212e120fc0b50c830c8a32bc901bfcf9b3b3fec4c5ee1e1dfa85c8b0e3 |
|
MD5 | 02694950870765faf41a1cb72af8334b |
|
BLAKE2b-256 | 7a3531eee81cdbee14b087d8831c2987d701e78355f462d2b8c4dd8660c722ae |