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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3db2dce626915eb1eb118880f8e82e86fe706e37d61726e38041693d01aae470 |
|
MD5 | deae8c37264aa74fe68789e8756e4f18 |
|
BLAKE2b-256 | 2287f5d637450f4ee6ba21af9ecbd1463cbff016a89cfa51ad7f616f1d2eaed3 |
Close
Hashes for PyFoldingAtHomeControl-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfb289c5108c94aa6a479f4baf24aba9c0990d0f1c9964baee08426bfceaf0e5 |
|
MD5 | ad196635bb0fc1e9388b8dfd53978c47 |
|
BLAKE2b-256 | 020651bf666b3d8bae79d87024dc4fd98bcc3b2bd584dfe40d8c87672bd9fdfb |