File transfer under Nameko


Hi Guys,

So I now I have Nameko microservices running on a Raspberry Pi and it all works beautifully. One service controls and Arduino and the other controls a Nikon camera with gphoto2.

The camera produces image files and these are downloaded by one of the services onto the Raspberry pi using one of the gphoto2 options. But now the files are on the Raspberry Pi and the main calling programme is running on a desktop. Is it possible to use Nameko to transfer the files from the Raspberry Pi to the main machine,or do I need to use another protocol like ftp or ssh?




Hi Steve,

You can use simple HTTP based file upload. Nameko HTTP entrypoint is build on top of werkzeug library. Request object has files property you can use to handle incoming file payload.



Hi Jakub,

Thanks for your reply. Sadly, I don’t really understand it.

Could you post some example code, please?




Hi Steve,

No problem. Please find the example here


Excellent, thank you, I’ll look through it. Do you think it is faster than SCP, which is what I ended up using?




Hi Steve,

Not sure what the speed implications would be here, that would require some testing. If scp works for your case then there is nothing wrong with it. Going through Nameko service would only make sense if you need some additional operations to be performed or events triggered before or after that file upload on the receiver side.


Hi Jakub,

Thanks for your support. I’ll probably stick with SCP then, unless I find a reason to move.