> 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.

# Python SDK examples

> Code samples showing how to use the emnify python SDK

The following examples show you how to use the emnify Python SDK.

The source code for each example is available in the [emnify-sdk-python GitHub repository](https://github.com/emnify/emnify-sdk-python/tree/main/docs/examples).

| Example                                                                                                                                | Description                                                                             |
| -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| [Get your first device online](https://github.com/emnify/emnify-sdk-python/blob/main/docs/examples/mass_sim_activation.py)             | Connect an emnify SIM to your device and configure the APN to access the internet.      |
| [Initialize the SDK client](https://github.com/emnify/emnify-sdk-python/blob/main/docs/examples/device_lifecycle_management.py)        | Import dependencies and initialize the SDK using an application token.                  |
| [Create and activate a device](https://github.com/emnify/emnify-sdk-python/blob/main/docs/examples/device_lifecycle_management.py)     | Assign an unassigned SIM, create a new device with defined parameters, and activate it. |
| [Configure a device](https://github.com/emnify/emnify-sdk-python/blob/main/docs/examples/device_lifecycle_management.py)               | Retrieve a device's details and adjust its attributes, like the name and tags.          |
| [Configure the operator blocklist](https://github.com/emnify/emnify-sdk-python/blob/main/docs/examples/device_lifecycle_management.py) | Add or remove operators from the blocklist.                                             |
| [Disable a device](https://github.com/emnify/emnify-sdk-python/blob/main/docs/examples/device_lifecycle_management.py)                 | Change a device status to disabled.                                                     |
| [Delete a device](https://github.com/emnify/emnify-sdk-python/blob/main/docs/examples/device_lifecycle_management.py)                  | Disable and delete a device with specific ID.                                           |
| [Filter a list of SIM cards](https://github.com/emnify/emnify-sdk-python/blob/main/docs/examples/filtering_and_sorting.py)             | Return all SIMs for a specific customer organization.                                   |
| [Sort all devices](https://github.com/emnify/emnify-sdk-python/blob/main/docs/examples/filtering_and_sorting.py)                       | Return a list of devices sorted by last updated date.                                   |
| [Manage device connectivity](https://github.com/emnify/emnify-sdk-python/blob/main/docs/examples/device_lifecycle_management.py)       | Reset the device or network connectivity and check the connectivity status.             |