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):
if message_type == PyOnMessageTypes.UNITS.value:
print("units: ", 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_forever()
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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e792bd85d1ca6c846af1ebdb274360cb194825c4872d89e4f309c25142f5abe |
|
MD5 | 814fbe92dca0425914aa9bb69952be61 |
|
BLAKE2b-256 | f142cfa27968c32f19136e6c1f328d95902f8c231c620b5000bba57232fe0c91 |
Close
Hashes for PyFoldingAtHomeControl-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e515c2d67e54125370feaa837996fd6419c485255b71b3a5141503b7d19ea34 |
|
MD5 | 250ec679945972e2ef5601b3d1bec33e |
|
BLAKE2b-256 | e7188b7639d1d27f3fc211d22a67f8b6d821064a3c09aa61a489c079eb99084a |