Skip to main content

Mender SDK for python

Project description



async with Mender(base_url = '') as mender:
    # List devices on page 1
    devices = await mender.get_devices_paged(page=1)

    # List all devices
    async for device in mender.get_devices():

    # Filter all devices by attributes
    async for device in mender.get_devices(attributes={"hostname": 'xxx-ffffffffffff'}):

or close your session by yourself:

mender = Mender(base_url = '')
# ...
# Remember to close during finishing
await mender.session.close()


Using pip:

pip install mender

Using pipenv:

pipenv install mender


pipenv run python3 sdist bdist_wheel
pipenv run twine upload dist/*

Device inventory


API Endpoints

All URIs are relative to

Class Method HTTP request Description
Mender devices_get GET /devices List devices
Mender devices_id_delete DELETE /devices/{id} Remove selected device
Mender devices_id_get GET /devices/{id} Get a selected device
Mender devices_id_group_get GET /devices/{id}/group Get a selected device's group
Mender devices_id_group_name_delete DELETE /devices/{id}/group/{name} Remove a device from a group
Mender devices_id_group_put PUT /devices/{id}/group Add a device to a group
Mender groups_get GET /groups List groups
Mender groups_name_devices_get GET /groups/{name}/devices List the devices belonging to a given group

User administration and authentication


API Endpoints

All URIs are relative to

Class Method HTTP request Description
Mender auth_login_post POST /auth/login Log in to Mender
Mender settings_get GET /settings Get user settings
Mender settings_post POST /settings Set user settings
Mender users_get GET /users List users
Mender users_id_delete DELETE /users/{id} Remove user from the system
Mender users_id_get GET /users/{id} Get user information
Mender users_id_put PUT /users/{id} Update user information
Mender users_post POST /users Create user



  • PEP 525 - Async Generator (require 3.6)
  • PEP 557 - Dataclass (require 3.7, but there is a backport library for 3.6)
  • PEP 498 - Formatted String Literals (require 3.6, but ther is a backport library for <3.6)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mender, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size mender-0.0.5-py3-none-any.whl (7.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size mender-0.0.5.tar.gz (7.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page