postgrest
2.9.1, released 4 months ago by supabase.io
Dart client library offering an ORM‑like interface to PostgREST/Supabase databases.
What it does
Provides methods to query, insert, update, and delete data via PostgREST endpoints. It adds features like auto‑retry, request timeout, and request aborting.
AI-written summary of version 2.9.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a typed, ORM‑style client for Supabase/Postgrest in a Flutter/Dart app
- You prefer a lightweight wrapper over http without code generation
Skip it when
- You require full code‑generated models (e.g., freezed)
- You need a different backend service such as Firebase
Strengths
- ORM‑like API simplifies database operations
- Built‑in support for auto‑retry, timeout, and abort
- Integrates tightly with Supabase ecosystem
Weaknesses
- Relies on http package; no built‑in caching
- No code‑generation for models, so manual mapping may be needed
- Limited to Supabase/PostgREST backends
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 5
import 'package:postgrest/postgrest.dart';
final client = PostgrestClient('https://your-project.supabase.co/rest/v1');
final response = await client.from('users').select().execute();
print(response.data);Alternatives
Packages that do the same job and could replace postgrest.
- posthog_flutter
Flutter client for PostHog analytics, feature flags, and session replay
84Compare - supabase_flutter
Flutter client for Supabase providing auth, database, realtime, storage and edge functions.
92Compare - firebase_database
Flutter plugin for Firebase Realtime Database with offline access and realtime syncing.
91Compare - realtime_client
Dart client for Supabase Realtime, listening to PostgreSQL changes via WebSocket
89Compare
Works with
Packages commonly used together with postgrest: ones it builds on, ones built on it, and its own family.
- loggingpostgrest depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- yet_another_json_isolatepostgrest depends on itParse and encode JSON in a dedicated isolate to avoid blocking the main thread.
- functions_clientSame familyDart client for invoking Supabase Edge Functions.
- supabaseBuilt on postgrestDart client for Supabase, usable in non-Flutter Dart environments.