---
description: Getting started with the official IOTA Client Library Python binding.
image: /img/logo/iota_mark_light.png
keywords:
- Python
- install
- pip
- unpack
---

import WarningPasswordStorage from "../_admonitions/_password_storage.md";

# Getting Started with IOTA Client Python Binding

## Security

<WarningPasswordStorage />

## Requirements

 * [Python 3.x](https://www.python.org).
 * [pip](https://pypi.org/project/pip).

## Installation

### Install prebuild libraries

Easiest way how to get python binding up and running is to leverage pre-built python libraries for linux/macos/windows that can be installed to your python environment (3.6+) via `pip`. The binding is automagically generated using github [actions](https://github.com/iotaledger/iota.rs/actions/workflows/python-bindings-publish.yml?query=branch%3Aproduction).

The latest artifacts for major python versions can be also grabbed using [nighly.link service](https://nightly.link/iotaledger/iota.rs/workflows/python-bindings-publish/production). Download zip file for the given os and pyversion, unpack wheel file (`.whl`) and install it via `pip`:

```bash
pip install <wheel_file>
```

### Install from source

### Additional Requirements

 * [Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html).
 * (for Linux only) `libudev`. You can install it with `apt install libudev-dev`.

#### Clone the Repository

You can clone the iota.rs client library by running the following command:

```bash
git clone -b production https://github.com/iotaledger/iota.rs
```

#### Change to the Python Binding Directory

After you have cloned the repository, you should change directory to iota.rs/bindings/python/native. You can do so by running the following command:

```bash
cd iota.rs/bindings/python/native
```

#### Install the Required Dependencies and Build the Wheel

Install and run maturin:

```bash
pip3 install maturin
maturin develop
maturin build --manylinux off
```
The wheel file is now created in `bindings/python/native/target/wheels`. You can install it with:

```bash
pip3 install [THE_BUILT_WHEEL_FILE]
```

Once it has been properly installed you can double check it using `pip`:

```bash
pip list
```

You should see the similar output:

```plaintext
Package                    Version
-------------------------- -------
iota-client-python           0.2.0a3
```

Once installed in the given python environment you are all set and can start hacking using python binding!

## Usage

```python
import iota_client
print(iota_client.__doc__)
print(dir(iota_client))

client = iota_client.Client(nodes_name_password=[['https://api.lb-0.h.chrysalis-devnet.iota.cafe']])

print('get_health()')
print(f'health: {client.get_health()}')

print('get_info()')
print(f'node_info: {client.get_info()}')
```
