Thursday, December 17, 2020

How to generate Python (or other code) from Postman

I’m not an API developer and occasionally I develop some python at SAP Data services.  So, when I faced some requirements involving APIs and SAP Data Services for the first time I was introduced to Postman and it was not so obvious to me the advantage of the tool at the first sight. If you want to know more about Postman go here. Long story short about Postman, this is an application for building and sharing APIs.

The obvious functionality here, if you are not developing an API, is the ability to share, visualize, and get a response right away.

However, another very cool functionality is the code generator module that converts a request into client code for your target language, in my case Python.

So, after you have imported the collection sent to you:

https://learning.postman.com/docs/getting-started/importing-and-exporting-data/

You can go to code:


Choose the language you are coding.


And integrate this code in your app (In my case in the user-defined transform).

More Information here:

https://learning.postman.com/docs/developer/code-generators/

I hope you enjoy it!


No comments:

Post a Comment