All Projects → PostgREST → Postgrest

PostgREST / Postgrest

Licence: mit
REST API for any Postgres database

Programming Languages

haskell
3896 projects
Nix
1067 projects
python
139335 projects - #7 most used programming language
shell
77523 projects
PLpgSQL
1095 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to Postgrest

Prest
PostgreSQL ➕ REST, low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new
Stars: ✭ 3,023 (-83.36%)
Mutual labels:  rest, automatic-api, database, postgresql
Php Crud Api
Single file PHP script that adds a REST API to a SQL database
Stars: ✭ 2,904 (-84.01%)
Mutual labels:  automatic-api, database, postgresql
Graphjin
GraphJin - Build APIs in 5 minutes with GraphQL. An instant GraphQL to SQL compiler.
Stars: ✭ 1,264 (-93.04%)
Mutual labels:  automatic-api, database, postgresql
Sandman2
Automatically generate a RESTful API service for your legacy database. No code required!
Stars: ✭ 1,765 (-90.28%)
Mutual labels:  rest, automatic-api, database
Postgrest Starter Kit
Starter Kit and tooling for authoring REST API backends with PostgREST
Stars: ✭ 657 (-96.38%)
Mutual labels:  rest, automatic-api, postgresql
Subzero Starter Kit
Starter Kit and tooling for authoring GraphQL/REST API backends with subZero
Stars: ✭ 136 (-99.25%)
Mutual labels:  rest, automatic-api, postgresql
Postgui
A React web application to query and share any PostgreSQL database.
Stars: ✭ 260 (-98.57%)
Mutual labels:  database, postgresql
Takeoff
A rapid development environment using docker for convenience.
Stars: ✭ 271 (-98.51%)
Mutual labels:  database, postgresql
Rel
💎 Modern Database Access Layer for Golang - Testable, Extendable and Crafted Into a Clean and Elegant API
Stars: ✭ 317 (-98.25%)
Mutual labels:  database, postgresql
Psycopg3
New generation PostgreSQL database adapter for the Python programming language
Stars: ✭ 278 (-98.47%)
Mutual labels:  database, postgresql
Devicehive Java Server
DeviceHive Java Server
Stars: ✭ 241 (-98.67%)
Mutual labels:  rest, postgresql
Dbq
Zero boilerplate database operations for Go
Stars: ✭ 273 (-98.5%)
Mutual labels:  database, postgresql
Nodejs Restful Api
How to create a RESTful CRUD API using Nodejs?
Stars: ✭ 285 (-98.43%)
Mutual labels:  rest, database
Migrations
SQL database migrations for Golang go-pg and PostgreSQL
Stars: ✭ 251 (-98.62%)
Mutual labels:  database, postgresql
docker-postgrest
REST API for any Postgres database (PostgREST Docker Image)
Stars: ✭ 22 (-99.88%)
Mutual labels:  postgrest, automatic-api
Pg chameleon
MySQL to PostgreSQL replica system
Stars: ✭ 274 (-98.49%)
Mutual labels:  database, postgresql
Flaresolverr
Proxy server to bypass Cloudflare protection
Stars: ✭ 241 (-98.67%)
Mutual labels:  rest, server
Pgquarrel
pgquarrel compares PostgreSQL database schemas (DDL)
Stars: ✭ 274 (-98.49%)
Mutual labels:  database, postgresql
Squeal
Squeal, a deep embedding of SQL in Haskell
Stars: ✭ 308 (-98.3%)
Mutual labels:  database, postgresql
Sql exporter
Database agnostic SQL exporter for Prometheus
Stars: ✭ 301 (-98.34%)
Mutual labels:  database, postgresql

Logo

Donate Donate Deploy Join the chat at https://gitter.im/begriffs/postgrest Docs Docker Stars Build Status Coverage Status Hackage docs

PostgREST serves a fully RESTful API from any existing PostgreSQL database. It provides a cleaner, more standards-compliant, faster API than you are likely to write from scratch.

Sponsors

Big thanks to our sponsors! You can join them by supporting PostgREST on Patreon.

Usage

  1. Download the binary (latest release) for your platform.

  2. Invoke for help:

    postgrest --help

Documentation

Latest documentation is at postgrest.org. You can contribute to the docs in PostgREST/postgrest-docs.

Performance

TLDR; subsecond response times for up to 2000 requests/sec on Heroku free tier. If you're used to servers written in interpreted languages, prepare to be pleasantly surprised by PostgREST performance.

Three factors contribute to the speed. First the server is written in Haskell using the Warp HTTP server (aka a compiled language with lightweight threads). Next it delegates as much calculation as possible to the database including

  • Serializing JSON responses directly in SQL
  • Data validation
  • Authorization
  • Combined row counting and retrieval
  • Data post in single command (returning *)

Finally it uses the database efficiently with the Hasql library by

  • Keeping a pool of db connections
  • Using the PostgreSQL binary protocol
  • Being stateless to allow horizontal scaling

Security

PostgREST handles authentication (via JSON Web Tokens) and delegates authorization to the role information defined in the database. This ensures there is a single declarative source of truth for security. When dealing with the database the server assumes the identity of the currently authenticated user, and for the duration of the connection cannot do anything the user themselves couldn't. Other forms of authentication can be built on top of the JWT primitive. See the docs for more information.

Versioning

A robust long-lived API needs the freedom to exist in multiple versions. PostgREST does versioning through database schemas. This allows you to expose tables and views without making the app brittle. Underlying tables can be superseded and hidden behind public facing views.

Self-documentation

PostgREST uses the OpenAPI standard to generate up-to-date documentation for APIs. You can use a tool like Swagger-UI to render interactive documentation for demo requests against the live API server.

This project uses HTTP to communicate other metadata as well. For instance the number of rows returned by an endpoint is reported by - and limited with - range headers. More about that.

Data Integrity

Rather than relying on an Object Relational Mapper and custom imperative coding, this system requires you put declarative constraints directly into your database. Hence no application can corrupt your data (including your API server).

The PostgREST exposes HTTP interface with safeguards to prevent surprises, such as enforcing idempotent PUT requests.

See examples of PostgreSQL constraints and the API guide.

Supporting development

You can help PostgREST ongoing maintenance and development by:

Every donation will be spent on making PostgREST better for the whole community.

Thanks

The PostgREST organization is grateful to:

  • The project sponsors and backers who support PostgREST's development.
  • The project contributors who have improved PostgREST immensely with their code and good judgement. See more details in the changelog.

The cool logo came from Mikey Casalaina.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].