postgrest (PostgREST/postgrest)

Searching Database…

What is this?PostgREST is a standalone server that turns any existing PostgreSQL database into a full RESTful API automatically — no backend code to write.
Is it a framework I build on, or a server I run?A server you run: a compiled standalone service that sits in front of Postgres and exposes your tables and views over HTTP, leaving your application code untouched.
How do I get it running?Install the PostgREST binary for your platform following the docs, or just use Docker, and point it at your PostgreSQL database.
Can a client corrupt my data through the API?No — PostgREST leans on declarative database constraints instead of an ORM, so no application, not even the API server, can corrupt your data; PUT requests are idempotent by design.
Why is it faster than a hand-written API server?Three factors from the README: compiled Haskell on the Warp HTTP server with lightweight threads, as much calculation as possible delegated to Postgres (JSON serialization, validation, authorization and row counting run in SQL), and efficient database use via Hasql — a connection pool over the binary protocol.
How does pagination work?Through plain HTTP range headers: the number of rows an endpoint returns is both reported and limited with range headers, no custom response envelope involved.
Is it free to use?Yes — PostgREST is open source under the MIT license, and its ongoing development is funded by community donations through Patreon.
Creator
PostgREST
Size
18.5 MB
Stars
27.8K
Age
12y
Commits · 90 Days