PUM, Swagger, Python and Gemstone

Though we were concentrating on Javascript/Sencha ExtJS to make it work against Gemstone/REST – we needed now some scripting support to write some small interactive programs to work against our REST system.

I tried to produce Python3 code via Swagger – but was surprised to see, that swagger-ui and swagger-codegen have slightly different opinions about how to interpret my swagger stuff. I had to patch my produced files to let codegen produce the Python3 code.

I looked at the produced code and in general this code was pretty simple. I decided to use the swagger-Python3-runtime, but produce all other files (API calls, class structures) via PUM.

Adding some cookie support to the swagger-Python3-runtime and after one day of work the first programs could be written to query our Gemstone/REST system via python.

As an IDE I used the community edition PyCharm (from JetBrains) and added lots of type hints to the produced code, so that PyCharm was able to offer Intellisense support.

The reason for the choice of Python was pretty obvious: large community, large infrastructure and an accepted language.

This entry was posted in Smalltalk and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s