Python library to get stats from your Folding@Home Clients
Project description
PyFoldingAtHomeControl
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.start())
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-2.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3abe803ea0a075b3bf901c0a95b30c65ce50ab4aeb619bcdd52efcdca95846a9 |
|
MD5 | 4d2da431dda84e85147cf737b04e9ee9 |
|
BLAKE2b-256 | c87224613cef80c4bc8f97a26105d2137dd7fa4251920f013e8e1f9c419d1e59 |
Close
Hashes for PyFoldingAtHomeControl-2.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d47ce9b9cffa4223162635f953a646258c9af60182e6b6e63ab9efd19ac9555 |
|
MD5 | 6d6ae37ad62824349d0c3ab83c553dcc |
|
BLAKE2b-256 | bb1e8f18650fce37205aebb1abaea557b13b388f18972165122450df6174452d |