Skip to content

Conversation

@gabrys
Copy link
Contributor

@gabrys gabrys commented Nov 17, 2025

I want to make working with nq easier by allowing to import runs, Filter, Attribute and AttributeFilter straight from neptune_query (often aliased as nq):

import neptune_query as nq
nq.runs.list_attributes(
  runs=nq.Filter.eq(nq.Attribute("sys/name"), "my-run"),
  attributes=nq.AttributeFilter(name="abc/"),
)

Before submitting checklist

  • Did you update the CHANGELOG? (not for test updates, internal changes/refactors or CI/CD setup)
  • Did you ask the docs owner to review all the user-facing changes?

@gabrys gabrys requested a review from Copilot November 17, 2025 10:45
@linear
Copy link

linear bot commented Nov 17, 2025

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds convenience exports to the neptune_query package, allowing users to import commonly used filtering classes and the runs module directly from the top-level package namespace. This enables cleaner import patterns like nq.Filter and nq.runs instead of requiring explicit imports from submodules.

Key Changes:

  • Added Attribute, AttributeFilter, Filter, and runs to the package's __all__ list
  • Alphabetized the existing exports in __all__
  • Added import statements at the end of the file to expose these convenience exports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

I want to make working with nq easier by allowing to import runs,
Filter, Attribute and AttributeFilter straight from `neptune_query`
(often aliased as `nq`):

```
import neptune_query as nq
nq.runs.list_attributes(
  runs=nq.Filter.eq(nq.Attribute("sys/name"), "my-run"),
  attributes=nq.AttributeFilter(name="abc/"),
)
```
@gabrys gabrys force-pushed the gabrys/py-207-nq-nqruns-nqfilter-nqattribute-nqattributefilter-dev-ex branch from f807eee to ddea0b9 Compare November 17, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants