PostgREST Documentationļ
PostgREST is a standalone web server that turns your PostgreSQL database directly into a RESTful API. The structural constraints and permissions in the database determine the API endpoints and operations.
Sponsorsļ
Database as Single Source of Truthļ
Using PostgREST is an alternative to manual CRUD programming. Custom API servers suffer problems. Writing business logic often duplicates, ignores or hobbles database structure. Object-relational mapping is a leaky abstraction leading to slow imperative code. The PostgREST philosophy establishes a single declarative source of truth: the data itself.
Declarative Programmingļ
Itās easier to ask PostgreSQL to join data for you and let its query planner figure out the details than to loop through rows yourself. Itās easier to assign permissions to database objects than to add guards in controllers. (This is especially true for cascading permissions in data dependencies.) Itās easier to set constraints than to litter code with sanity checks.
Leak-proof Abstractionļ
There is no ORM involved. Creating new views happens in SQL with known performance implications. A database administrator can now create an API from scratch with no custom programming.
One Thing Wellļ
PostgREST has a focused scope. It works well with other tools like Nginx. This forces you to cleanly separate the data-centric CRUD operations from other concerns. Use a collection of sharp tools rather than building a big ball of mud.
Getting Supportļ
The project has a friendly and growing community. For discussions, use the Github discussions page. You can also report or search for bugs/features on the Github issues page.
Releasesļ
PostgREST follows MAJOR.PATCH two-part versioning:
MAJOR: feature release, may deprecate or remove things.PATCH: fix/security release only; no features, no behavior changes.
Starting from v14.0, only even-numbered MAJOR versions will be released, reserving odd-numbered MAJOR versions for development.
All the releases are published on PostgRESTās GitHub release page.
Tutorialsļ
Are you new to PostgREST? This is the place to start!
Also have a look at Installation and Community Tutorials.
Referencesļ
Technical references for PostgRESTās functionality.
Explanationsļ
Key concepts in PostgREST.
How-tosļ
Recipes thatāll help you address specific use-cases.
Integrationsļ
Integrations
Ecosystemļ
PostgREST has a growing ecosystem of examples, libraries, and experiments. Here is a selection.
In Productionļ
Here are some companies that use PostgREST in production.
Nimbus - See how Nimbus uses PostgREST in Paul Copplestoneās blog post.
Testimonialsļ
āItās so fast to develop, it feels like cheating!ā
āFranƧois-Guillaume Ribreau
āI just have to say that, the CPU/Memory usage compared to our Node.js/Waterline ORM based API is ridiculous. Itās hard to even push it over 60/70 MB while our current API constantly hits 1GB running on 6 instances (dynos).ā
āLouis Brauer
āI really enjoyed the fact that all of a sudden I was writing microservices in SQL DDL (and v8 JavaScript functions). I dodged so much boilerplate. The next thing I knew, we pulled out a full rewrite of a Spring+MySQL legacy app in 6 months. Literally 10x faster, and code was super concise. The old one took 3 years and a team of 4 people to develop.ā
āSimone Scarduzio
āI like the fact that PostgREST does one thing, and one thing well. While PostgREST takes care of bridging the gap between our HTTP server and PostgreSQL database, we can focus on the development of our API in a single language: SQL. This puts the database in the center of our architecture, and pushed us to improve our skills in SQL programming and database design.ā
āEric BrĆ©chemier, Data Engineer, eGull SAS
āPostgREST is performant, stable, and transparent. It allows us to bootstrap projects really fast, and to focus on our data and application instead of building out the ORM layer. In our k8s cluster, we run a few pods per schema we want exposed, and we scale up/down depending on demand. Couldnāt be happier.ā
āAnupam Garg, Datrium, Inc.
Contributingļ
Please see the Contributing guidelines in the main PostgREST repository.