ni / ni/datastore-python

Consider supporting method chaining to simplify query creation \ data selection \ data reading (OData Functions).

Open
#115 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
2
Forks
0
Avg merge
1d 14h
Merged PRs (30d)
6

Description

In the python data science ecosystem method chaining is a common way of simplifying query creation and data manipulations.

  1. Polars Expressions and Contexts
  2. Pandas has similar options

I came across a recent odata python client, odata-bc, that implemented method chaining for complex queries that resulted in very readable code:

from odata import OData, Q
from datetime import date

client = OData("http://localhost:42001/api/data-store/v1/odata")

test_results = (
    client("TestResults")
        .filter((Q("StartDateTime") >= date(2026, 1, 1)) & (Q("StartDateTime") <= date(2026, 12, 31)))
        .select("Name","StartDateTime" ,"EndDateTime" ,"Outcome", "OperatorId", "TestStationId", "Id")
        .orderby("StartDateTime")
        .fetch()
)

test_results.head()

This is just intended as illustration of the concept, the odata-bc library has its limitations with no public repository or documentations.

AB#3752518

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing datastore-python client query API and its tests, since the issue names no files or entry points. Compare the current query-building flow with the chained filter, select, orderby, and fetch example in the issue. Done should mean the project has a defined, tested method-chaining approach for complex OData queries.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.