OData Python Library available?

PythonOdata

Python Problem Overview


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.

Python Solutions


Solution 1 - Python

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 ;)

Solution 2 - Python

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)

Solution 3 - Python

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

Solution 4 - Python

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

Solution 5 - Python

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.

Solution 6 - Python

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPatrick WolfView Question on Stackoverflow
Solution 1 - PythonandriView Answer on Stackoverflow
Solution 2 - PythontuomurView Answer on Stackoverflow
Solution 3 - Pythonswl10View Answer on Stackoverflow
Solution 4 - PythondowskiView Answer on Stackoverflow
Solution 5 - PythonJeff LaFayView Answer on Stackoverflow
Solution 6 - PythonRICHA AGGARWALView Answer on Stackoverflow