A Pythonic interface to the Antminer API.
Connect to a miner and get version information. Where appropriate, an instance of semantic_version.Version
is returned.
from antminer.base import BaseClient
client = BaseClient('192.168.0.25') # Change to IP address of your miner.
client.connect()
print client.version()
The LocalMiners
class is an iterator that looks for miners on the LAN. A BaseClient
is returned for each miner discovered.
from antminer.discover import LocalMiners
network = LocalMiners()
for miner in network:
print miner.version()