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.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8adf63f3a30e8932051cad15f3bee6419f444964f2bb6c331f876cf0a20cc224 |
|
MD5 | b81b301dca6e7624a9299622964897ea |
|
BLAKE2b-256 | a89a69375825dda8c515fd5f59566bece38fb66d9d0ffbf9b02c87f633681dc4 |
Close
Hashes for PyFoldingAtHomeControl-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0ec715e7db9984f1a63128cda89ff08ce0c8eb7173d994dc40fc320fef69df5 |
|
MD5 | 413ae75923d5cbecd71cf398c195e24b |
|
BLAKE2b-256 | 32eee40064254ebdb1a80983728f7fdd04d72c9a3da52de55bac2f89f845999f |