Skip to content

Add strip_nulls() to the query builder #1759

Description

@fresh55

Description

Noticed this while adding the same thing to the C# client (supabase/supabase-csharp#509).

supabase-js has stripNulls(), which asks PostgREST to leave null fields out of the returned rows. supabase-py has no modifier for this, and sdk-compliance.yaml lists database.using_modifiers.strip_nulls as not implemented.

Suggested solution

A strip_nulls() modifier that sets the nulls=stripped Accept media type, like supabase-js.

client.table("users").select("*").strip_nulls().execute()
# Accept: application/vnd.pgrst.array+json;nulls=stripped

After single() it would use the object variant (application/vnd.pgrst.object+json;nulls=stripped), and like supabase-js it can't be combined with csv().

Alternatives

No response

Additional context

Needs PostgREST 11.2 or later.

Activity

  1. added
    enhancement
    on Oct 18, 2026
  2. added theissue type on Oct 18, 2026
  3. added
    PostgREST
    python
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeaturePostgRESTenhancementpython

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions