# Mender with python app

**URL:** <https://hub.mender.io/t/mender-with-python-app/1038>\
**Category:** General Discussions\
**Tags:** raspberry-pi-3\
**Created:** [September 18, 2019, 6:39pm UTC](https://hub.mender.io/t/mender-with-python-app/1038 "2019-09-18T18:39:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bonini\_lucas](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bonini_lucas/32/124_2.png) [@bonini\_lucas](https://hub.mender.io/u/bonini_lucas)\
**Post date:** [September 18, 2019, 6:39pm UTC](https://hub.mender.io/t/mender-with-python-app/1038/1 "2019-09-18T18:39:09Z")

</div>

Hello people,  
I am trying to understand how Mender works. I found an amazing platform and I’m checking if it can fit my needs.  
I have difficulty understanding the concept of artifacts and how they are constructed.  
Leanly, what I have is raspberry pi devices running pyhon-written applications and would like to implement OTA updates. Does anyone have examples or could they help me?  
For now I have no need for .deb system and package upgrades as, from what I saw, Mender can offer, but it’s interesting for the near future.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [September 19, 2019, 2:19pm UTC](https://hub.mender.io/t/mender-with-python-app/1038/2 "2019-09-19T14:19:32Z")

</div>

Hello @bonini_lucas. Welcome to the community.

It sounds like what you are most interested in are file based updates. Take a look at these two links in particular:

- [Single File](https://hub.mender.io/t/single-file/486/13)
- [Directory](https://hub.mender.io/t/directory/325/28)

Those should get you started on deploying your Python code to a running system.

Drew

---

<div class="post-metadata">

**Author:** ![bonini\_lucas](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bonini_lucas/32/124_2.png) [@bonini\_lucas](https://hub.mender.io/u/bonini_lucas)\
**Post date:** [September 23, 2019, 11:29am UTC](https://hub.mender.io/t/mender-with-python-app/1038/3 "2019-09-23T11:29:40Z")

</div>

Hello @drewmoseley,

Thank you for your help. I successfully created a mender server but I was unable to connect a device.  
Do all devices need to have .iso or .img modified by mender? Even to run the modules of the links you sent?  
I am using the open source tools but I believe I am having difficulties to setup the devices. I feel it’s easier than it sounds but I’m missing something, some authentication failure …

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [September 23, 2019, 12:12pm UTC](https://hub.mender.io/t/mender-with-python-app/1038/4 "2019-09-23T12:12:10Z")

</div>

> Do all devices need to have .iso or .img modified by mender? Even to run the modules of the links you sent?

This is not necessary if you are only interested in trying Update Modules.

I would recommend you to walk trough,

[https://docs.mender.io/2.1/getting-started/create-a-test-environment](https://docs.mender.io/2.1/getting-started/create-a-test-environment)

and then follow the on-boarding that is shown on the server to connect a device. You should see a “CONNECT A DEVICE” button on the Mender server dashboard, which will walk you trough how to do it.

---

<div class="post-metadata">

**Author:** ![bonini\_lucas](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bonini_lucas/32/124_2.png) [@bonini\_lucas](https://hub.mender.io/u/bonini_lucas)\
**Post date:** [September 23, 2019, 1:38pm UTC](https://hub.mender.io/t/mender-with-python-app/1038/5 "2019-09-23T13:38:44Z")

</div>

Ok, I finally managed to connect an SBC to the local mender server.  
Now the challenge is to deploy using the directory module through the links @drewmoseley sent.

I managed to create the .mender file but when uploading to the server the button to create the deploy remains inactive.

---

<div class="post-metadata">

**Author:** ![bonini\_lucas](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bonini_lucas/32/124_2.png) [@bonini\_lucas](https://hub.mender.io/u/bonini_lucas)\
**Post date:** [September 23, 2019, 1:51pm UTC](https://hub.mender.io/t/mender-with-python-app/1038/6 "2019-09-23T13:51:36Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/09b3e7c52145bb105230b6126ab5e365001d516b.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/77cb01f6d959b0bc175ff250351156cc577bf16d.png)

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [September 23, 2019, 1:57pm UTC](https://hub.mender.io/t/mender-with-python-app/1038/7 "2019-09-23T13:57:47Z")

</div>

The “Device types” must match what you set on your device.

You can check what your device is reporting in the Devices tab, and the regenerate the .mender file with that information

---

<div class="post-metadata">

**Author:** ![bonini\_lucas](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bonini_lucas/32/124_2.png) [@bonini\_lucas](https://hub.mender.io/u/bonini_lucas)\
**Post date:** [September 23, 2019, 2:32pm UTC](https://hub.mender.io/t/mender-with-python-app/1038/8 "2019-09-23T14:32:09Z")

</div>

I finally did it. Thanks a lot for the help.

Is there a security session on mender that could direct me to read? Mostly on the client side.

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [September 24, 2019, 7:22am UTC](https://hub.mender.io/t/mender-with-python-app/1038/9 "2019-09-24T07:22:41Z")

</div>

Hi, @bonini_lucas, there are a couple of resources to get started:

- [https://mender.io/learn/datasheets/\_resources/Requirements%20for%20OTA.pdf](https://mender.io/learn/datasheets/_resources/Requirements%2520for%2520OTA.pdf)
- [https://docs.mender.io/2.1/architecture](https://docs.mender.io/2.1/architecture)

Hope this helps.

-OO

---

<div class="post-metadata">

**Author:** ![ajithpv](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ajithpv/32/728_2.png) [@ajithpv](https://hub.mender.io/u/ajithpv)\
**Post date:** [September 25, 2019, 7:19am UTC](https://hub.mender.io/t/mender-with-python-app/1038/10 "2019-09-25T07:19:49Z")

</div>

You can start with:

1. [https://docs.mender.io/2.1/artifacts/signing-and-verification](https://docs.mender.io/2.1/artifacts/signing-and-verification)

And can find more details of usage in

1. [https://docs.mender.io/2.1/artifacts/yocto-project/building-for-production#artifact-signing-and-verification-keys](https://docs.mender.io/2.1/artifacts/yocto-project/building-for-production#artifact-signing-and-verification-keys)

2. [https://docs.mender.io/2.1/artifacts/yocto-project/variables#mender\_artifact\_verify\_key](https://docs.mender.io/2.1/artifacts/yocto-project/variables#mender_artifact_verify_key)
