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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75cdcfeb10c6fb86f53b68962af45b9026c60b9600a6d624b4b5859f201643ea |
|
MD5 | a062a99b3a8c6e5872a4aed4459d1b99 |
|
BLAKE2b-256 | 39a897208f80daa1ce18efb39455e722d268149e319527437af3ea06525761d3 |
Close
Hashes for PyFoldingAtHomeControl-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c5cc3d03e86b1b0d0db849457e96a98f8de187c69fa08385d281e4e8d043cc6 |
|
MD5 | 264a79c3512ecf3f14f709d8b2164aae |
|
BLAKE2b-256 | 43034175a4f195ad9fd002920bf1e1ddeafac26c8160271f8a8745aec4056fa4 |