{"id":13394121,"url":"https://github.com/PostgREST/postgrest","last_synced_at":"2025-03-13T19:31:59.022Z","repository":{"id":37450323,"uuid":"20787122","full_name":"PostgREST/postgrest","owner":"PostgREST","description":"REST API for any Postgres database","archived":false,"fork":false,"pushed_at":"2025-03-10T04:42:41.000Z","size":12227,"stargazers_count":24817,"open_issues_count":313,"forks_count":1063,"subscribers_count":334,"default_branch":"main","last_synced_at":"2025-03-10T23:42:04.778Z","etag":null,"topics":["api","automatic-api","database","haskell","http","pg","pgsql","postgres","postgresql","postgrest","rest","server","sql"],"latest_commit_sha":null,"homepage":"https://postgrest.org","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PostgREST.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"postgrest"}},"created_at":"2014-06-13T00:23:00.000Z","updated_at":"2025-03-10T11:21:01.000Z","dependencies_parsed_at":"2023-10-12T23:34:51.005Z","dependency_job_id":"178ae625-e7fe-40d6-ab84-98b39e24de88","html_url":"https://github.com/PostgREST/postgrest","commit_stats":{"total_commits":3539,"total_committers":222,"mean_commits":"15.941441441441441","dds":0.734670810963549,"last_synced_commit":"a064d0df94e60538aab35b76d61b9de74902ad05"},"previous_names":["begriffs/postgrest"],"tags_count":93,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostgREST%2Fpostgrest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostgREST%2Fpostgrest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostgREST%2Fpostgrest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostgREST%2Fpostgrest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PostgREST","download_url":"https://codeload.github.com/PostgREST/postgrest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243469244,"owners_count":20295715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","automatic-api","database","haskell","http","pg","pgsql","postgres","postgresql","postgrest","rest","server","sql"],"created_at":"2024-07-30T17:01:09.643Z","updated_at":"2025-03-13T19:31:58.995Z","avatar_url":"https://github.com/PostgREST.png","language":"Haskell","readme":"![Logo](static/postgrest.png \"Logo\")\n\n[![Donate](https://img.shields.io/badge/Donate-Patreon-orange.svg?colorB=F96854)](https://www.patreon.com/postgrest)\n[![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://postgrest.org)\n[![Docker Stars](https://img.shields.io/docker/pulls/postgrest/postgrest.svg)](https://hub.docker.com/r/postgrest/postgrest/)\n[![Build Status](https://github.com/postgrest/postgrest/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/PostgREST/postgrest/actions?query=branch%3Amain)\n[![Coverage Status](https://img.shields.io/codecov/c/github/postgrest/postgrest/main)](https://app.codecov.io/gh/PostgREST/postgrest)\n[![Hackage docs](https://img.shields.io/hackage/v/postgrest.svg?label=hackage)](http://hackage.haskell.org/package/postgrest)\n\nPostgREST serves a fully RESTful API from any existing PostgreSQL\ndatabase. It provides a cleaner, more standards-compliant, faster\nAPI than you are likely to write from scratch.\n\n## Sponsors\n\n\u003ctable align=\"center\"\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"https://www.cybertec-postgresql.com/en/?utm_source=postgrest.org\u0026utm_medium=referral\u0026utm_campaign=postgrest\" target=\"_blank\"\u003e\n          \u003cimg width=\"296px\" src=\"static/cybertec.svg\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"https://gnuhost.eu/?utm_source=sponsor\u0026utm_campaign=postgrest\" target=\"_blank\"\u003e\n          \u003cimg width=\"296px\" src=\"static/gnuhost.png\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"https://neon.tech/?utm_source=sponsor\u0026utm_campaign=postgrest\" target=\"_blank\"\u003e\n          \u003cimg width=\"296px\" src=\"static/neon.jpg\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"https://code.build/?utm_source=sponsor\u0026utm_campaign=postgrest\" target=\"_blank\"\u003e\n          \u003cimg width=\"296px\" src=\"static/code-build.png\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"https://supabase.io?utm_source=postgrest%20backers\u0026utm_medium=open%20source%20partner\u0026utm_campaign=postgrest%20backers%20github\u0026utm_term=homepage\" target=\"_blank\"\u003e\n          \u003cimg width=\"296px\" src=\"static/supabase.png\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"https://tembo.io/?utm_source=sponsor\u0026utm_campaign=postgrest\" target=\"_blank\"\u003e\n          \u003cimg width=\"296px\" src=\"static/tembo.png\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\nBig thanks to our sponsors! You can join them by supporting PostgREST on [Patreon](https://www.patreon.com/postgrest).\n\n## Usage\n\n1. Download the binary ([latest release](https://github.com/PostgREST/postgrest/releases/latest))\n   for your platform.\n2. Invoke for help:\n\n    ```bash\n    postgrest --help\n    ```\n## [Documentation](http://postgrest.org)\n\nLatest documentation is at [postgrest.org](http://postgrest.org). You can contribute to the docs in [PostgREST/postgrest/docs](https://github.com/PostgREST/postgrest/tree/main/docs).\n\n## Performance\n\nTLDR; subsecond response times for up to 2000 requests/sec on Heroku\nfree tier. If you're used to servers written in interpreted languages,\nprepare to be pleasantly surprised by PostgREST performance.\n\nThree factors contribute to the speed. First the server is written\nin [Haskell](https://www.haskell.org/) using the\n[Warp](http://www.yesodweb.com/blog/2011/03/preliminary-warp-cross-language-benchmarks)\nHTTP server (aka a compiled language with lightweight threads).\nNext it delegates as much calculation as possible to the database\nincluding\n\n* Serializing JSON responses directly in SQL\n* Data validation\n* Authorization\n* Combined row counting and retrieval\n* Data post in single command (`returning *`)\n\nFinally it uses the database efficiently with the\n[Hasql](https://nikita-volkov.github.io/hasql-benchmarks/) library\nby\n\n* Keeping a pool of db connections\n* Using the PostgreSQL binary protocol\n* Being stateless to allow horizontal scaling\n\n## Security\n\nPostgREST [handles\nauthentication](http://postgrest.org/en/stable/auth.html) (via JSON Web\nTokens) and delegates authorization to the role information defined in\nthe database. This ensures there is a single declarative source of truth\nfor security.  When dealing with the database the server assumes the\nidentity of the currently authenticated user, and for the duration of\nthe connection cannot do anything the user themselves couldn't. Other\nforms of authentication can be built on top of the JWT primitive. See\nthe docs for more information.\n\n## Versioning\n\nA robust long-lived API needs the freedom to exist in multiple\nversions. PostgREST does versioning through database schemas. This\nallows you to expose tables and views without making the app brittle.\nUnderlying tables can be superseded and hidden behind public facing\nviews.\n\n## Self-documentation\n\nPostgREST uses the [OpenAPI](https://openapis.org/) standard to\ngenerate up-to-date documentation for APIs. You can use a tool like\n[Swagger-UI](https://github.com/swagger-api/swagger-ui) to render\ninteractive documentation for demo requests against the live API server.\n\nThis project uses HTTP to communicate other metadata as well.  For\ninstance the number of rows returned by an endpoint is reported by -\nand limited with - range headers. More about\n[that](http://begriffs.com/posts/2014-03-06-beyond-http-header-links.html).\n\n## Data Integrity\n\nRather than relying on an Object Relational Mapper and custom\nimperative coding, this system requires you put declarative constraints\ndirectly into your database. Hence no application can corrupt your\ndata (including your API server).\n\nThe PostgREST exposes HTTP interface with safeguards to prevent\nsurprises, such as enforcing idempotent PUT requests.\n\nSee examples of [PostgreSQL\nconstraints](http://www.tutorialspoint.com/postgresql/postgresql_constraints.htm)\nand the [API guide](http://postgrest.org/en/stable/api.html).\n\n## Supporting development\n\nYou can help PostgREST ongoing maintenance and development by making a regular donation through Patreon https://www.patreon.com/postgrest\n\nEvery donation will be spent on making PostgREST better for the whole community.\n\n## Thanks\n\nThe PostgREST organization is grateful to:\n\n- The project [sponsors and backers](https://github.com/PostgREST/postgrest/blob/main/BACKERS.md) who support PostgREST's development.\n- The project [contributors](https://github.com/PostgREST/postgrest/graphs/contributors) who have improved PostgREST immensely with their code\n  and good judgement. See more details in the [changelog](https://github.com/PostgREST/postgrest/blob/main/CHANGELOG.md).\n\nThe cool logo came from [Mikey Casalaina](https://github.com/casalaina).\n","funding_links":["https://patreon.com/postgrest","https://www.patreon.com/postgrest"],"categories":["Haskell","Install from Source","数据库、分布存储相关","Parallel Systems Learning Resources","其他__大数据","API","sql","database","api","Development Tools","Compiled list","Utilities"],"sub_categories":["Databases","Parallel Systems Courses \u0026 Tutorials","网络服务_其他","Samples","plv8:"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPostgREST%2Fpostgrest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPostgREST%2Fpostgrest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPostgREST%2Fpostgrest/lists"}