Metadata-Version: 2.1
Name: iota-sdk
Version: 1.1.0rc0
Requires-Dist: dacite >=1.8.1
Requires-Dist: pyhumps >=3.8.0
Summary: Python bindings for the IOTA SDK library
Keywords: iota,client,wallet,transaction,python
Home-Page: https://www.iota.org/
Author: IOTA Stiftung
License: Apache-2.0
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Source Code, https://github.com/iotaledger/iota-sdk

# IOTA SDK Library - Python binding

Python binding to the [iota-sdk library](/README.md).

## Table of contents

- [IOTA SDK Library - Python binding](#iota-sdk-library---python-binding)
  - [Table of contents](#table-of-contents)
  - [Requirements](#requirements)
  - [Getting Started](#getting-started)
    - [Install the IOTA SDK](#install-the-iota-sdk)
  - [Client](#client-usage)
  - [Wallet](#wallet-usage)
  - [Examples](#examples)
  - [API Reference](#api-reference)
  - [Learn More](#learn-more)

## Requirements

- [Python 3.9+](https://www.python.org)
- [pip ^21.x](https://pypi.org/project/pip)
- `Rust` and `Cargo` to compile the binding. Install
  them [here](https://doc.rust-lang.org/cargo/getting-started/installation.html).

## Getting Started

### Install the IOTA SDK

1. Move to the Python bindings directory:

   ```bash
   cd iota-sdk/bindings/python
   ```

2. (optional) Create a virtual environment and use it. On Linux and macOS, you can run the following commands:

   '''bash
   python3 -m venv iota_sdk_venv
   source iota_sdk_venv/bin/activate
   '''

   If you are using Windows, you should run the following instead:

   ```bash
   .\iota_sdk_venv\Scripts\activate`
   ```

3. Install the required dependencies and build the wheel by running the following commands:

   ```bash
   pip install -r requirements-dev.txt
   pip install .
   ```

4. (optional) If you want to deactivate the virtual environment, run the following command:

   ```bash
   deactivate
   ```

## Client Usage

The following example creates a Client instance connected to the Shimmer Testnet, and retrieves the node's information by calling `Client.get_info()`, and then print the node's information.

[examples/client/getting_started.py](examples/client/getting_started.py)

## Wallet Usage

The following example will create a new Wallet Account  using a StrongholdSecretManager, and then print the account's information.

[examples/wallet/getting_started.py](examples/wallet/getting_started.py)

## Examples

You can use the provided code [examples](https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples) to acquainted with the IOTA SDK. You can use the following command to
run any example:

```bash
python3 example/[example file]
```

- Where `[example file]` is the file name from the example folder. For example:

```bash
python3 examples/client/00_get_info.py
```

## API Reference

You can find the API reference for the Python bindings in the
[IOTA Wiki](https://wiki.iota.org/shimmer/iota-sdk/references/python/iota_sdk/client/).


## Learn More

To learn more about Rust, see the [Rust documentation](https://www.rust-lang.org).

