Ok. I want to consume REST based services.
I'd like to use python. In fact, I am going to use python.
The way I'd like to use it is from the command line/ipython, to try out different REST services, with intention of formally coding it later. ( my usage of the REST service not the generic api thing )
I'm looking for a pretty generic, fully featured REST client/API in python. Not bare bones, but plush, nice to use. There are tons of them out there, but I'd kind of like to settle on one and master it.
Any suggestions?
EDIT: This is one:
https://github.com/benoitc/restkit
EDIT: http://pypi.python.org/pypi/requests is exactly it.
EDIT: http://pypi.python.org/pypi/siesta is just as perfect!
There are several ways to consume a REST API from Python. However, the easiest way is to utilize the module, requests. Here, we are calling the get method defined in the requests module. The URL will determine what data will be returned back.
REST stands for REpresentational State Transfer and is an architectural style used in modern web development. It defines a set or rules/constraints for a web application to send and receive data. In this article, we will build a REST API in Python using the Flask framework.
The problem with having a "plush" REST client library is that REST itself isn't that well-defined. REST, in and of itself, just means that you want to use HTTP standards whenever possible, but other than that, the field is wide open.
Is the data encoded with JSON? What are the URL schemes and what do they mean?
Since REST basically just means HTTP, your best bet is httplib, but I wouldn't describe it as plush.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With