OData Python 库可用吗?

发布于 2024-10-01 07:59:19 字数 221 浏览 8 评论 0原文

我想知道是否有任何 OData Python 库可用于生成和使用 OData? 不同语言有不同的实现: http://www.odata.org/libraries/

但到目前为止我找不到Python。顺便说一句,我指的不是 IronPython。该库应该只能在 Python 中使用。

I was wondering if any OData Python libraries are available to produce and consume OData?
There are implementations for different languages:
http://www.odata.org/libraries/

But I couldn't find Python so far. I don't mean IronPython by the way. The library should be just usable in Python.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

深爱不及久伴 2024-10-08 07:59:19

我是 http://code.google.com/p/odata- 库的作者py/
它仍处于早期阶段,但它提供了最基本的功能(创建、读取、更新)。如果您发现错误或想要做出贡献,请随时留言;)

i am the author of the library at http://code.google.com/p/odata-py/
it's still in its early stages but it provides the most basic functionalities (create, read, update). Don't hesitate to drop a message if you see a bug or want to contribute ;)

樱娆 2024-10-08 07:59:19

我最近将一些 OData 模块添加到我为一个名为 Pyslet 的电子学习项目维护的 Python 包中。该项目托管在 Github 上:https://github.com/swl10/pyslet

我写了一篇介绍性文章博客文章在此演示 OData 消费者功能: http://swl10.blogspot.co.uk/2014/02/a-dictionary-like-python-interface-for.html

I've recently added some OData modules to a Python package I maintain for an e-Learning project called Pyslet. The project is hosted on Github here: https://github.com/swl10/pyslet

I wrote an introductory blog post demonstrating the OData consumer features here: http://swl10.blogspot.co.uk/2014/02/a-dictionary-like-python-interface-for.html

油饼 2024-10-08 07:59:19

我不久前开始了自己的 OData 4.0 消费者项目。它基于 requests 库,并且是纯 Python 的。这是相当小的,因为我只实现了工作所需的东西。在我的 github 上查看。

工作原理有点像这样:

from odata import ODataService
url = 'http://services.odata.org/V4/Northwind/Northwind.svc/'
Service = ODataService(url, reflect_entities=True)
Product = Service.entities['Product']

query = Service.query(Product)
query = query.filter(Product.ProductName.startswith('Queso'))
query = query.order_by(Product.UnitPrice.desc())
for product in query:
    print(product.ProductName)

I started my own OData 4.0 consumer project some time ago. It's based on the requests library and is pure Python. It's rather minimal as I've only implemented things I needed for work. Check it out on my github.

Works kinda like this:

from odata import ODataService
url = 'http://services.odata.org/V4/Northwind/Northwind.svc/'
Service = ODataService(url, reflect_entities=True)
Product = Service.entities['Product']

query = Service.query(Product)
query = query.filter(Product.ProductName.startswith('Queso'))
query = query.order_by(Product.UnitPrice.desc())
for product in query:
    print(product.ProductName)
时间你老了 2024-10-08 07:59:19

以下是针对 Google App Engine 的版本:http://code.google.com/p /odata-py/

我一直在尝试该规范,并为 Python 编写了一个名为 MyOhData 的简单服务器: https://bitbucket.org/dowski/myohdata/src

Here is a version that is targeting Google App Engine: http://code.google.com/p/odata-py/

I've been experimenting with the spec and wrote a simple server for Python called MyOhData: https://bitbucket.org/dowski/myohdata/src

指尖微凉心微凉 2024-10-08 07:59:19

请检查此链接

http://www.odata.org/libraries/

ODataPy (Python)
ODataPy 是一个实现开放数据协议 (OData) 的开源 Python 库。它支持 OData 协议版本 4.0。它使用语言绑定构建在 ODataCpp 之上。它正在开发中,目前仅服务于 OData 的客户端和客户端代理生成(代码生成)方面的部分内容。

V4 客户端 GitHub
适用于 CoreData 的 ODataStore (iOS)
ODataStore for CoreData 是一个 iOS 静态库和 Mac OS X 框架,用于将 V3 OData 服务与 Apple 的 CoreData 框架结合使用。未来将支持V4 OData服务。开发语言是Objective-C。

V3 双向链接
Pyslet Python 包 (Python)
Pyslet 是学习教育和培训标准的 Python 包。它实现了许多标准,包括具有客户端和服务器功能的 OData v2。

V2 双向链接
OData4ObjC
该库使 iOS 应用程序开发人员可以轻松地与任何符合 OData 的 Web 服务中的数据进行交互。它支持元数据感知的客户端代码生成和带有查询的完整 CRUD。如果有人通过 OData 公开数据模型,OData4ObjC 可以轻松将该模型移植到您的 iOS 设备上。

V1-3 客户端 GitHub

please check this link

http://www.odata.org/libraries/

ODataPy (Python)
ODataPy is an open-source Python library that implements the Open Data Protocol (OData). It supports the OData protocol version 4.0. It is built on top of ODataCpp using language binding. It is under development and currently serves only parts of client and client side proxy generation (code gen) aspects of OData.

V4 Client GitHub
ODataStore for CoreData (iOS)
The ODataStore for CoreData is an iOS static library and a Mac OS X Framework to use V3 OData services with the CoreData Framework from Apple. V4 OData services will be supported in the future. The development language is Objective-C.

V3 Both Link
Pyslet Python Package (Python)
Pyslet is a Python package for Standards in Learning Education and Training. It implements a number of standards including OData v2 with both client and server capabilities.

V2 Both Link
OData4ObjC
This library makes it easy for iOS app developers to interact with data in any OData-compliant web service. It supports metadata-aware client-side code generation and full CRUD with query. If someone exposes a data model via OData, OData4ObjC makes it easy to get that model onto your iOS device.

V1-3 Client GitHub

暮年 2024-10-08 07:59:19

在了解了 OData 的介绍后,我也进行了查看,不幸的是,到目前为止似乎还没有。我会密切关注其中的一个,因为我确信其中一个会浮出水面。

更新 2016

OData 库 列出了两个支持 OData 的 Python 库。 pyslet 看起来是最活跃的,因为它在过去几个月中进行了提交并发布了多个版本。我还没有尝试过它们中的任何一个,所以我不能真正说它们是否有效。

I've looked as well after getting an intro to OData and it looks like there isn't one as of yet unfortunately. I'll be keeping an eye out for one as I'm sure one will surface.

Update 2016

OData Libraries lists two python libraries that support OData. With pyslet looking to be the most active since it has had commits in the last few months and several releases. I haven't tried either of them so I can't really say if they work well or not.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文