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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 105ec126a727a542481b2208719e407e7fa17f75dfe1985b6e11f8b4a0812066 |
|
MD5 | 23174de7fd460561465f758adc606deb |
|
BLAKE2b-256 | 15368ba3214f2f411a7943da196e2269e00525beaa79b0fdd5a11638971ced48 |
Close
Hashes for PyFoldingAtHomeControl-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8889fd31a11c1d1aa3a0a7a64565102864a0e8ca5532cba392134713db1faf0d |
|
MD5 | 90426167b2add483c197f98d2ee58672 |
|
BLAKE2b-256 | b84c750d4d711e60497fdd7f3e9ad143cc12159d2cdb7a3f97e530f5cb53854b |