Question

Is there a Python framework that makes it easy to build a bridge to any API?

A "bridge" in this context meaning simply: Some website or service exposes a JSON API. I want to get well-defined Python objects from the API instead of JSON.

It seems to me that the "bridge" pattern consists of some pretty simple components:

  • request / authentication handling

  • model definitions that match the API endpoints

  • translation from JSON into models

Rather than re-creating this pattern from scratch for every API that I want to make a bridge to, it seems like it would be smart to just have a generic "bridge" framework that simply required model definitions and some customization for the API you wanted to use. Sort of like Django, but for building bridge libraries instead of web apps.

Anybody know of anything like that out there?

Was it helpful?

Solution

There's restkit which will do the job as you expect.

but as the duplicate I showed off states, you can find as well:

  • siesta
  • or build your own easily with requests and python's included json parser.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top