Python 3 Images service - working example?

Hi all,

We are currently at a loss as to how to get the bundled Images service working in the local Python 3 dev server.

It is definitely supposed to be supported in the Python 3 runtime.

Can anyone from Google share examples on how this can be accomplished?

D-day is tomorrow for getting our app working in Python 3 so would appreciate hearing back soon.

Kind regards,
Nick

1 Like

I’ve added working code to my response on Stackoverflow

NoCommandLine
https://nocommandline.com

A GUI for Google App Engine
& Datastore Emulator

Thanks @NoCommandLine

Does your code also work in the dev_appserver? If so which version of the app server and Python are you running locally?

As I mentioned in the comments on the code and my original answer

  1. There’s no storage emulator so the images that I tested with were uploaded to cloud

  2. Because they were uploaded to the cloud (and not stored locally), the url returned by image.get_serving_url won’t work (the base of the url refers to localhost whereas the encoded image is actually on cloud)

  3. Yes, I ran the app using dev_appserver.py

  4. I’m running Python 3.9 on Google Cloud SDK 455.0.0

NoCommandLine
https://nocommandline.com

A GUI for Google App Engine
& Datastore Emulator

1 Like