是否有通用 python 库来使用基于 REST 的服务? [英] Is there a Generic python library to consume REST based services?

查看:39
本文介绍了是否有通用 python 库来使用基于 REST 的服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的.我想使用基于 REST 的服务.

Ok. I want to consume REST based services.

我想使用python.事实上,我将使用python.

I'd like to use python. In fact, I am going to use python.

我想使用它的方式是从命令行/ipython 中尝试不同的 REST 服务,并打算稍后对其进行正式编码.(我对 REST 服务的使用不是通用 api 的东西)

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 )

我正在寻找一个非常通用、功能齐全的 Python REST 客户端/API.不是裸露的骨头,而是毛绒的,很好用.那里有很多,但我有点想选择一个并掌握它.

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.

有什么建议吗?

这是一个:

https://github.com/benoitc/restkit

http://pypi.python.org/pypi/requests 就是这样.

http://pypi.python.org/pypi/siesta 就像完美!

推荐答案

拥有豪华" REST 客户端库的问题在于 REST 本身并没有那么明确.REST 本身只是意味着您希望尽可能使用 HTTP 标准,但除此之外,该领域是开放的.

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.

数据是否使用 JSON 编码?什么是 URL 方案?它们的含义是什么?

Is the data encoded with JSON? What are the URL schemes and what do they mean?

因为 REST 基本上只是意味着 HTTP,所以你最好的选择是 httplib,但我不会把它描述为长毛绒.

Since REST basically just means HTTP, your best bet is httplib, but I wouldn't describe it as plush.

这篇关于是否有通用 python 库来使用基于 REST 的服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆