Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[FR] Can we add `shallow` support to `Query.get` like `Reference.get`...?

Open
#662 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
firebase, python
Domain
database

Research direction

Start by comparing the Query.get and Reference.get entry points against the Firebase Realtime Database REST documentation linked in the issue. Confirm whether shallow can be combined with order_by_child and equal_to, then make Query.get accept the parameter and verify that the shown filtered query returns only reference keys.

Written by the indexing model from the issue text.

Description

api: database type: feature request

Is your feature request related to a problem? Please describe.

The addition of the shallow parameter when retrieving data was requested in #61 and accepted in #109, but this only added the shallow param to Reference.get. I have a Query (order_by_child) that I would like to shallow, but Query.get doesn't support the param.

Describe the solution you'd like

I don't see any limitation to having both the orderByChild and shallow parameters in the docs for RTDB via Rest, but admittedly I haven't tried it yet. If there are none, can we add shallow to Query.get, too?

Describe alternatives you've considered

None exist, as far as I know, if I need to select a subset of paths filtered by criteria but only want the keys of those refs. Open to suggestion otherwise...

Additional context

Expected

>>> just_ids_please = (firebase_admin.db
...    .reference("/path/to/resource")
...    .order_by_child("some/child")
...    .equal_to("some_value")
...).get(shallow=True)
...
>>>

Actual

>>> just_ids_please = (firebase_admin.db
...    .reference("/path/to/resource")
...    .order_by_child("some/child")
...    .equal_to("some_value")
...).get(shallow=True)
...
TypeError: get() got an unexpected keyword argument 'shallow'
Dominant language
Python
Stars
1.2k
Forks
359
Avg merge
3d 9h
Merged PRs (30d)
3

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.

More from firebase/firebase-admin-python

All issues in firebase/firebase-admin-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.