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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4a7a62bdce5dda42aee96ba1bec77c70ba89993ea3be7c170db5b59ab5ef5b0 |
|
MD5 | 416d85d2296e47ccae8c99189897be27 |
|
BLAKE2b-256 | d7e4640f189760657ab68013480b462b9931347a076385fe6aa5c8ae97d7b667 |
Close
Hashes for PyFoldingAtHomeControl-2.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9400d70f3594ff418e5597833742e702772e1ba7761d41e7450abd08bce160bd |
|
MD5 | 329ff0e09947ecae397674487e2f6380 |
|
BLAKE2b-256 | bf3ff6e5aaf5e2ef1720c0179e57976cf59ddaa8dc70c0a633f6471e4ebee7d8 |