[Chicago] REST API to Python Class?

HADDLETON, Robert W (Bob) bob.haddleton at nokia.com
Tue May 2 11:29:20 EDT 2017


Python Swagger/OpenAPI Client library - https://github.com/Yelp/bravado

Python Swagger/OpenAPI Server Library - https://github.com/zalando/connexion

Both have examples that demonstrate how to use them to import 
swagger.json definition files and interact with/serve the
associated REST API.

Bob


On 5/2/2017 10:03 AM, Jordan Bettis wrote:
> You'd need to have the service provide a WSDL for this to be possible.
> I've rarely seen REST/JSON APIs with a WSDL. OTOH REST/JSON APIs tend to
> be a heck of a lot more simple than SOAP APIs, and easier to read too.
>
> On 05/02/2017 09:52 AM, Chris Foresman wrote:
>> I don’t know of any tool that can arbitrarily interact with a JSON API
>> unless it conforms to some open standard. I’d start looking here  and
>> see if this is compatible with the API you want to
>> access: http://www.coreapi.org
>>
>>
>> Chris Foresman
>> foresmac at gmail.com <mailto:foresmac at gmail.com>
>>
>>
>>
>>
>>> On May 2, 2017, at 9:01 AM, Lukasz Szybalski <szybalski at gmail.com
>>> <mailto:szybalski at gmail.com>> wrote:
>>>
>>> Hello,
>>> Does anybody know if there is a tool that would auto-read rest API and
>>> create a python like object that you can interact in python? (like:
>>> pysimplesoap and its WSDL() but for REST)
>>>
>>> /myobject = Rest/(https://dev.twitter.com/rest/public)
>>>
>>> or
>>> http://developer.edmunds.com/api-documentation/vehicle/
>>> or
>>> ....
>>>
>>>
>>> then myobject.get.searchTweet('chicago python')..?
>>> or what ever the syntax is.
>>> This would issue a rest api call and return object back.
>>>
>>> I think a lot of projects are building python api that are more and
>>> more json exposed. I'm looking for a tool that would allow me to
>>> access these using python, instead of rest:
>>> *
>>> *"GET /1.1/search/tweets.json?q=chicago%20python":
>>>
>>> +Access anything that was build with:
>>> http://swagger.io/
>>> openapi
>>>
>>>
>>> Thanks
>>> Lucas
>>>
>>>
>>> --
>>> LucasManual.com <http://lucasmanual.com>
>>>
>>> _______________________________________________
>>> Chicago mailing list
>>> Chicago at python.org <mailto:Chicago at python.org>
>>> https://mail.python.org/mailman/listinfo/chicago
>>
>>
>> _______________________________________________
>> Chicago mailing list
>> Chicago at python.org
>> https://mail.python.org/mailman/listinfo/chicago
>>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bob_haddleton.vcf
Type: text/x-vcard
Size: 278 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/chicago/attachments/20170502/ae5227fc/attachment.vcf>


More information about the Chicago mailing list