> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emnify.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emnify.com/_mcp/server.

# Getting started with the emnify Python SDK

> Step-by-step guide for installing and using the emnify Python SDK

## Installation

The emnify Python SDK is open source and the [source code is available on GitHub](https://github.com/emnify/emnify-sdk-python).

### Prerequisites

* Python ([version 3.9.0](https://www.python.org/downloads/release/python-390/) or higher)

### Install from source code (requires build)

```shell {3}
git clone https://github.com/emnify/emnify-sdk-python.git
cd emnify-sdk-python
python -m build --sdist --wheel
```

For local development install with pipenv:

```shell {3-5}
git clone https://github.com/emnify/emnify-sdk-python.git
cd emnify-sdk-python
brew install pipenv # for macOS
python -m pip install pipenv # for other OS
pipenv sync
```

### Install with pip

The emnify Python SDK is also available on [PyPI as `emnify-sdk`](https://pypi.org/project/emnify-sdk/):

```shell
pip install emnify-sdk
```

## Configuration

### Create an application token

To use the Python SDK, you need to create an application token.
You can do this on the **Integrations** page of the emnify Portal under [**Application Tokens**](https://portal.emnify.com/integrations#application-tokens) or the [emnify REST API](/developers/auth/application-tokens).

Once created, you'll apply it to initiate the SDK.

### Use the SDK

```python
import os
# Import the package
from emnify import EMnify

# Initiate the SDK instance using your application token
emnify = EMnify(os.environ["EMNIFY_TOKEN"])

# Execute a command against the desired API
devices = emnify.devices.get_devices_list()

# Show all the devices
print([device for device in devices])
```

Before executing the code, define an environment variable containing your application token:

```shell
export EMNIFY_TOKEN=ey........
```

## Explore more

Now that you have the SDK configured, it's time to learn what you can do with it.

> **Tip**
>
> If you're new to IoT connectivity and emnify, start by learning the [common terminology and concepts](/developers/sdks/concepts).

Once you're comfortable with these concepts, you can explore some use cases that show what the SDK is capable of based on a few [examples](/developers/sdks/python/examples).

Also, see the [API reference](https://emnify.github.io/emnify-sdk-python/autoapi/index.html).