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
File details
Details for the file pyfoldingathomecontrol-3.0.1.tar.gz
.
File metadata
- Download URL: pyfoldingathomecontrol-3.0.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.65.0 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d485fa4a6fa3696ad72f9918d9bed87071cf006f6f803ee4c365ac1dd6d50ddf |
|
MD5 | b38e5a864136c878e1b6a9c406e2afdb |
|
BLAKE2b-256 | 90c6aa1f450b320adbe5000102862648cb09530f4c4d02d284faee7f2e4495e9 |
File details
Details for the file pyfoldingathomecontrol-3.0.1-py3-none-any.whl
.
File metadata
- Download URL: pyfoldingathomecontrol-3.0.1-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.65.0 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a8647fd22086ca5ae73dfc4161db270e54c4e7e8d65a5197b2f3c0efca09bc7 |
|
MD5 | d507011c1e0fa9ed791351ae41ea3496 |
|
BLAKE2b-256 | 741f10ecb1b4cc38276afca186f5f0301ba35d3112dd9f03576fe20a86daf61d |