Mercurius restfulapi客户端Python库
mercurius-restful-api-client-librar的Python项目详细描述
Perseus Place RESTful API客户端Python库
提供Pythonic接口以连接到使用Perseus restfulapi框架开发的restfulapi服务器的类存储库。在
Python库Poster 0.8.1
注意:这个库包含poster 0.8.1
的修改版本,该版本提供了一组类和函数,以便于使用标准的多部分/表单数据编码发出httppost(或PUT)请求。在
原始库poster 0.8.1
不能用于上传上传到内存中的文件(即流到内存),比如djangoInMemoryUploadedFile
。原因是这样的类文件对象不支持fileno()
方法,poster 0.8.1
用于确定要在Python模块poster.encode
中上载的类文件对象的大小:
iffileobjisnotNoneandfilesizeisNone:# Try and determine the file sizetry:self.filesize=os.fstat(fileobj.fileno()).st_sizeexcept(OSError,AttributeError):try:fileobj.seek(0,2)self.filesize=fileobj.tell()fileobj.seek(0)except:raiseValueError("Could not determine filesize")
此代码引发io.UnsupportedOperation
未捕获的异常io.UnsupportedOperation
。chrisatlee把Alon Hammerman的补丁放在了图书馆“海报”的标签tip
中不支持操作对于2013年3月12日的文件编号:
但是,可与pip
一起安装的poster
的最新版本仍然是0.8.1
。在
- 项目
标签: