skillfed

odata-query

An OData query parser and transpiler.

odata-query v0.10.0 161.5K downloads/30d#10,632 on PyPI
Permissive license MIT DORMANT released

What it is and what it does

odata-query is a parser and transpiler for OData v4 filter strings—the standardized query format used in REST APIs. It reads an OData filter expression and converts it into native query objects for your ORM or database layer. The package supports Django QuerySets, SQLAlchemy ORM queries, and SQLAlchemy Core, making it useful when you need to expose OData-compliant filtering to API clients without writing custom query translation logic.

The library depends on python-dateutil for date handling and sly for parsing. It's marked Production/Stable and supports Python 3.7 through 3.12, but has been dormant for over two years—no active maintenance or updates. Installation is straightforward with optional extras for Django and SQLAlchemy integration.

Use it for:

  • Build a REST API that accepts OData filter strings and translates them to Django ORM queries without manual parsing.
  • Convert OData queries to SQLAlchemy expressions in a data service layer.
  • Parse OData filters to raw SQL for direct database queries in non-ORM scenarios.
  • Expose standardized query syntax to API clients while keeping backend query logic decoupled.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses OData v4 filter strings and transpiles them to Django QuerySets, SQLAlchemy queries, or raw SQL for database filtering.

Yes, if you need OData v4 filter parsing for Django or SQLAlchemy and can tolerate dormant maintenance. The package is stable and has no known vulnerabilities, with low install friction. However, verify compatibility with your specific ORM versions before relying on it in production, since the last release was 777 days ago and no updates are forthcoming.

Install

odata-query on PyPI

pip

pip install odata-query

uv

uv add odata-query

poetry

poetry add odata-query

Installing odata-query

Before you install

Low friction: pure Python wheel with only two runtime dependencies (python-dateutil and sly). Maintenance is dormant—last release was 777 days ago—so expect no active bug fixes or feature updates, though the package is marked Production/Stable.

License in practice

MIT license (permissive) means you can use this freely in commercial and open-source projects with minimal restrictions, provided you include the license notice.

Quickstart

pip install odata-query

from odata_query.django import apply_odata_query
query = apply_odata_query(MyModel.objects, "name eq 'test'")
results = query.all()

Requires Python 3.7–3.12; optional extras (django, sqlalchemy) must be installed separately if you want ORM integration.

Verify before relying

  • Whether dormant status (777 days since last release) affects compatibility with recent Django/SQLAlchemy versions.
  • Whether the modular/extensible architecture mentioned in docs supports custom ORM backends beyond Django and SQLAlchemy.
  • Real-world performance and feature completeness for complex OData filter expressions.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 2 — python-dateutil, sly
Maintenance dormant — 777 days since the last release
First released
Downloads 161,453/month — #10,632 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: odata_query-0.10.0-py3-none-any.whl

Keywords: OData, Query, Parser

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: SQLTopic :: DatabaseTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Indexing/SearchTopic :: Software Development :: Compilers

Tags

odata filter parserodata to sql conversionodata query transpilerdjango odata filteringsqlalchemy odata supportodata v4 query builder
odata-parserquery-transpiler

More WWW/HTTP packages