在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):PostgREST/postgrest开源软件地址(OpenSource Url):https://github.com/PostgREST/postgrest开源编程语言(OpenSource Language):Haskell 59.8%开源软件介绍(OpenSource Introduction):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. SponsorsBig thanks to our sponsors! You can join them by supporting PostgREST on Patreon. Usage
DocumentationLatest documentation is at postgrest.org. You can contribute to the docs in PostgREST/postgrest-docs. PerformanceTLDR; 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
Finally it uses the database efficiently with the Hasql library by
SecurityPostgREST 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. VersioningA 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-documentationPostgREST 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 IntegrityRather 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 developmentYou can help PostgREST ongoing maintenance and development by:
Every donation will be spent on making PostgREST better for the whole community. ThanksThe PostgREST organization is grateful to:
The cool logo came from Mikey Casalaina. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论