All Projects → iotaledger → Iota.py

iotaledger / Iota.py

Licence: mit
PyOTA: The IOTA Python API Library

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Iota.py

Iota.lib.cpp
IOTA C++ Library
Stars: ✭ 84 (-75.07%)
Mutual labels:  api, cryptocurrency, iota, internet-of-things
Iota.go
IOTA Go API Library. Find documentation on https://docs.iota.org/
Stars: ✭ 319 (-5.34%)
Mutual labels:  api, cryptocurrency, iota, internet-of-things
Iota Java
IOTA Java API Library. Find documentation on
Stars: ✭ 137 (-59.35%)
Mutual labels:  api, cryptocurrency, iota, internet-of-things
Cryptocurrency Cli
💰 Cryptocurrency Portfolio On The Command Line 💰
Stars: ✭ 99 (-70.62%)
Mutual labels:  api, cryptocurrency, iota
Cryptocurrency Portfolio
Google Sheets automatic creation with Google Apps Script (GAS) for managing a cryptocurrency tracking spreadsheet with multi exchanges
Stars: ✭ 134 (-60.24%)
Mutual labels:  api, cryptocurrency
Bittrex.net
A C# .Net wrapper for the Bittrex web API including all features easily accessible and usable
Stars: ✭ 131 (-61.13%)
Mutual labels:  api, cryptocurrency
Coingecko Api
A Node.js wrapper for the CoinGecko API with no dependencies.
Stars: ✭ 159 (-52.82%)
Mutual labels:  api, cryptocurrency
Ccxt Rest
Open Source Unified REST API of 100+ Crypto Exchange Sites (18k+ docker pulls) - https://ccxt-rest.io/
Stars: ✭ 210 (-37.69%)
Mutual labels:  api, cryptocurrency
Python Binance Chain
Binance Chain Exchange API python implementation for automated trading
Stars: ✭ 96 (-71.51%)
Mutual labels:  api, cryptocurrency
Huobi java
Java SDK for Huobi Spot API
Stars: ✭ 180 (-46.59%)
Mutual labels:  api, cryptocurrency
Php Bitcoinrpc
Fully unit-tested Bitcoin JSON-RPC client based on GuzzleHttp.
Stars: ✭ 231 (-31.45%)
Mutual labels:  api, cryptocurrency
Coinbase Pro Node
Coinbase Pro API written in TypeScript and covered by tests.
Stars: ✭ 116 (-65.58%)
Mutual labels:  api, cryptocurrency
giotan
The CLI Tool for IOTA in Go
Stars: ✭ 30 (-91.1%)
Mutual labels:  internet-of-things, iota
iota-python
A Pure-Python implementation of IOTA node
Stars: ✭ 30 (-91.1%)
Mutual labels:  internet-of-things, iota
Pycoingecko
Python wrapper for the CoinGecko API
Stars: ✭ 270 (-19.88%)
Mutual labels:  api, cryptocurrency
Binance.api.csharp.client
C#.NET client for Binance Exchange API.
Stars: ✭ 98 (-70.92%)
Mutual labels:  api, cryptocurrency
Binance
A .NET Standard Binance API library.
Stars: ✭ 199 (-40.95%)
Mutual labels:  api, cryptocurrency
Ccxt.net
CCXT.NET – CryptoCurrency eXchange Trading Library for .NET
Stars: ✭ 89 (-73.59%)
Mutual labels:  api, cryptocurrency
Python Binance
Binance Exchange API python implementation for automated trading
Stars: ✭ 4,114 (+1120.77%)
Mutual labels:  api, cryptocurrency
Cryptolist
Curated collection of blockchain & cryptocurrency resources.
Stars: ✭ 3,501 (+938.87%)
Mutual labels:  api, cryptocurrency


The official Python client library for interacting with the Tangle

Developer documentation portal

Auto-generated docs Discord StackExchange MIT license Supported IRI API endpoints Build status

AboutPrerequisitesInstallationGetting startedExamplesSupporting the projectJoining the discussion


About

This is the official Python client library, which allows you to do the following:

  • Create transactions
  • Read transactions
  • Sign transactions
  • Generate addresses

This is beta software, so there may be performance and stability issues. Please report any issues in our issue tracker.

Prerequisites

To install the IOTA Python client library and its dependencies, you need Python version 3.7 or 3.6 installed on your device.

Installation

To download the IOTA Python client library and its dependencies, do the following:

pip install pyota

Installing the optional C extension

PyOTA has an optional C extension that improves the performance of its cryptography features by an average of 60 times.

To install this extension, do the following:

pip install pyota[ccurl]

Installing the optional module for local proof of work

To do proof of work on your local device without relying on a node, you can install the PyOTA-PoW extension module.

To install this extension, use the following command::

pip install pyota[pow]

When you've installed this module, you can use it by passing the local_pow=True argument to your API instance. Doing so will redirect all attach_to_tangle API calls to an interface function in the pow package.

Installing from source

To install the library from the source code on GitHub, do the following:

# Recommended, but not required
Create virtualenv
git clone https://github.com/iotaledger/iota.py.git
pip install -e .

Getting started

After you've installing the library, you can connect to an IRI node to send transactions to it and interact with the ledger. An extended guide can be found on our documentation portal, we strongly recommend you to go here for starting off. A quick starting tutorial is shown below.

To connect to a local IRI node, you can do the following:

from iota import Iota

# Create a new instance of the IOTA API object
# Specify which node to connect to
api = Iota(adapter = 'https://nodes.devnet.iota.org:443')

# Call the `get_node_info()` method for information about the node and the Tangle
response = api.get_node_info()

print(response)

Examples

We have a list of test cases in the examples directory that you can use as a reference when developing apps with IOTA.

Here's how you could send a zero-value transaction, using the library. For the guide, see the documentation portal.

# You don't need a seed to send zero-value transactions
api = Iota('https://nodes.devnet.iota.org:443', devnet=True)

# Define a message to send.
# This message must include only ASCII characters.
message = TryteString.from_unicode('Hello world')

# Define an address.
# This does not need to belong to anyone or have IOTA tokens.
# It must only contain a maximum of 81 trytes
# or 90 trytes with a valid checksum
address = 'ZLGVEQ9JUZZWCZXLWVNTHBDX9G9KZTJP9VEERIIFHY9SIQKYBVAHIMLHXPQVE9IXFDDXNHQINXJDRPFDXNYVAPLZAW'

# Define a zero-value transaction object
# that sends the message to the address
tx = ProposedTransaction(
    address = Address(address),
    message = message,
    value = 0
)

# Create a bundle from the `ProposedTransaction` object
# and send the transaction to the node
result = api.send_transfer(transfers=[tx])

print('Bundle: ')

print(result['bundle'].hash)

Supporting the project

If the IOTA Python client library has been useful to you and you feel like contributing, consider posting a bug report, feature request or a pull request.

We have some basic contribution guidelines to keep our code base stable and consistent.

Running test cases

To run test, do the following:

python setup.py test

PyOTA is also compatible with tox, which will run the unit tests in different virtual environments (one for each supported version of Python).

To run the unit tests, it is recommended that you use the -p argument. This speeds up the tests by running them in parallel.

Install PyOTA with the test-runner extra to set up the necessary dependencies, and then you can run the tests with the tox command::

pip install -e .[test-runner]
tox -v -p all

Building the autogenerated documentation

The autogenerated documentation can be generated on your local device by doing the following:

# Install extra dependencies (you only have to do this once)
pip install .[docs-builder]
cd docs
# Build the documentation::
make html

Joining the discussion

If you want to get involved in the community, need help with getting set up, have any issues related with the library or just want to discuss blockchain, distributed ledgers, and IoT with other people, feel free to join our Discord.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].