Nerves and python

I recently started with playing with nerves and a raspberry pi (and I totally love it so far!).

One thing I noticed is that a huge amout of resources are available for programming the pi in python. For some things it would be really nice to be able to use python dependencies in my projects.

A concrete example is the following. I was thinking about automating a gopro with my raspberry and nerves, now it looks like the main api that’s available is in python (Setup - goprohero).

I was wondering if it is possible to use this api from nerves? Maybe like done here: nerves.build. If I take this approach, can I find more information on this, how to include dependencies in the python build, doing a pip install upfront,…
Or would you say, try to stay away from it and go from a REST api GitHub - KonradIT/goprowifihack: Unofficial GoPro WiFi API Documentation - HTTP GET requests for commands, status, livestreaming and media query., something that’s not officially supported, but that should work for my use case.

3 Likes

You will have to get pretty familiar with Buildroot. You won’t just get to pip install something. You will have to be pretty diligent about what dependencies you have/need. I use some Python deps on a production Nerves app, and there’s no real easy way of setting it up. The good thing is most python packages are fairly simple wrappers around existing C/C++ code, so it should be pretty easy to port any existing code if you are familiar with those languages.

2 Likes