Getting started with the emnify Python SDK
The emnify Python SDK is open source and the source code is available on GitHub.
- Python (version 3.6.0 or higher)
Install from source code
git clone https://github.com/emnify/emnify-sdk-python.git
python setup.py install
Install with pip
The emnify Python SDK is also available on PyPI as
pip install emnify-sdk
Create an application token
Once created, you'll apply it to initiate the SDK.
Use the SDK
# 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:
Now that you have the SDK configured, it's time to learn what you can do with it.
If you're new to IoT connectivity and emnify, start by learning the common terminology and concepts.