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.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d178db1aa99d72ec06a2a09c1b3d2d56c47ae67d37c8b837067aeccf40c62467 |
|
MD5 | 5cfb6fede02f291d674072a5ab6a22b4 |
|
BLAKE2b-256 | b1baff1b0e23804543595b179d11b65289764c5d3b434d819931d55657f7bd7f |
Close
Hashes for PyFoldingAtHomeControl-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a84e050db6cf5f4cb9169094e5719d58096470dafc926b173fc67ce329fb70f6 |
|
MD5 | 31d833316de7fd27cce0eb11e4ba99cc |
|
BLAKE2b-256 | 6d2559a34e2648cb961d49a645a25e000f1bcdd68dd3242afaeb76f4f8432373 |