PyOTA is compatible with Python 3.7 and 3.6.
Install PyOTA using pip:
pip install pyota[ccurl,pow]
[ccurl] extra installs the optional PyOTA-CCurl extension.
This extension boosts the performance of certain crypto operations significantly (speedups of 60x are common).
[pow] extra installs the optional PyOTA-PoW extension.
This extension makes it possible to perform proof-of-work
attach_to_tangle) locally, without relying on an iota node.
local_pow parameter at api instantiation:
api = Iota('https://nodes.thetangle.org:443', local_pow=True)
set_local_pow() method of the api class to dynamically
enable/disable the local proof-of-work feature.
In order to interact with the IOTA network, you will need access to a node.
Note that light wallet nodes often disable certain features like PoW for security reasons.
Once you’ve gotten access to an IOTA node, initialize an
object with the URI of the node, and optional seed:
from iota import Iota # Generate a random seed. api = Iota('http://localhost:14265') # Specify seed. api = Iota('http://localhost:14265', 'SEED9GOES9HERE')
Test your connection to the server by sending a
You are now ready to send commands to your IOTA node!