Dominic Bou-Samra
Dominic Bou-Samra

Reputation: 15416

Using Django/Python to CONSUME existing web services

I have an existing REST application serving either JSON or XML. I can use the framework (Play) to render templates directly, but I'm not allowed to (arbitrary homework requirement they just invented), and forced to use a second layer to consume, process and render the REST objects.

I want to use Django/Python if possible. What do you recommend? Something where I'm not parsing JSON directly would be nice.

Is it possible in Django? I would like to do all my templating and views at this level. So something with a good templating language is needed.

Or should I be using something even more lightweight like httpLib/urlLib?

Upvotes: 2

Views: 2125

Answers (1)

Ned Batchelder
Ned Batchelder

Reputation: 375932

Inside your Django app, you can easily use the urllib and json modules in the Python standard library to pull data from URLs, and then parse them as JSON.

Upvotes: 2

Related Questions