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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f85f1388ff5e79049e8084e5fc03df00f426274f476466067d2b814456796c5 |
|
MD5 | 8e4251aa4672cdd78e2011550a6bc391 |
|
BLAKE2b-256 | 1098caf2703e14be2d82ac8cf1234465e06d408e6d78ad093a841a4c0fa064c0 |
Close
Hashes for PyFoldingAtHomeControl-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49255c2b294807ff14c79c47eab5a3ed5c85add88324fd9f25f5e047c5ca18e2 |
|
MD5 | d4468eaebba0c5c105896311ad77aaad |
|
BLAKE2b-256 | 79769c5b0af21befc4d858da06a26c42c2b63a2bbffddc0496e6e557aabc8b22 |