NpgsqlRest 3.3.1
dotnet add package NpgsqlRest --version 3.3.1
NuGet\Install-Package NpgsqlRest -Version 3.3.1
<PackageReference Include="NpgsqlRest" Version="3.3.1" />
<PackageVersion Include="NpgsqlRest" Version="3.3.1" />
<PackageReference Include="NpgsqlRest" />
paket add NpgsqlRest --version 3.3.1
#r "nuget: NpgsqlRest, 3.3.1"
#:package NpgsqlRest@3.3.1
#addin nuget:?package=NpgsqlRest&version=3.3.1
#tool nuget:?package=NpgsqlRest&version=3.3.1
NpgsqlRest
Automatic REST API Server for PostgreSQL
Transform your PostgreSQL database into a production-ready REST API server with automatic TypeScript code generation and end-to-end type safety.
<p align="center"> <img src="clean.png" alt="NpgsqlRest Architecture" width="500"> </p>
Documentation | Getting Started | Configuration Reference | Annotation Guide
Key Features
- Instant API Generation - Automatically creates REST endpoints from PostgreSQL functions, procedures, tables, and views
- Declarative Configuration - Configure endpoints directly in your database using comment annotations
- Code Generation - Auto-generate frontend TypeScript/JavaScript code and .http files for testing
- High Performance - check out benchmarks showing low latency and high throughput. Latest benchmark show that it is 6.1x faster than PostgREST at 100 concurrent users,
- Native Executables - AOT-compiled binaries with zero dependencies and instant startup
- RESTful Path Parameters - Define routes like
/products/{id}with parameters extracted from URL paths - Reverse Proxy Endpoints - Forward requests to upstream services with passthrough or transform modes
- HTTP Custom Types - Enable PostgreSQL functions to call external APIs via annotated composite types
- Enterprise Ready - Authentication, authorization, rate limiting, caching, SSE streaming, OpenAPI 3.0, and more
Clean Architecture Done Right
Clean Architecture tells us to keep business logic independent of frameworks, databases, and delivery mechanisms. In practice, this often means layers upon layers of abstractions, DTOs, mappers, and repositories - all trying to "protect" the domain from the database.
But what if the database is the best place for your business logic?
PostgreSQL is not just storage. It's a powerful computation engine with transactions, constraints, triggers, functions, and decades of optimization. NpgsqlRest flips the script: instead of abstracting away the database, it puts PostgreSQL at the center and generates everything else.
- Schema as contract - Your tables, views, and functions become REST endpoints. One source of truth, zero drift.
- SQL comments as config - Routes, auth rules, caching - all declared where the logic lives.
- Types flow outward - PostgreSQL types generate TypeScript clients automatically. No manual mappings.
- No middle tier - No ORM impedance mismatch, no N+1 queries, no controller boilerplate.
Installation
| Method | Command |
|---|---|
| NPM | npm i npgsqlrest |
| Docker | docker pull vbilopav/npgsqlrest:latest |
| Direct Download | Releases |
| .NET Library | dotnet add package NpgsqlRest |
Requirements
- PostgreSQL >= 13
- No runtime dependencies for native executables
Documentation
For complete documentation including configuration options, authentication setup, TypeScript generation, and more, visit npgsqlrest.github.io
Contributing
Contributions are welcome. Please open a pull request with a description of your changes.
License
MIT License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Npgsql (>= 10.0.1)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on NpgsqlRest:
| Package | Downloads |
|---|---|
|
NpgsqlRest.TsClient
Automatic Typescript Client Code Generation for NpgsqlRest |
|
|
NpgsqlRest.HttpFiles
Automatic HTTP Files Generation for NpgsqlRest |
|
|
NpgsqlRest.CrudSource
CRUD Source for NpgsqlRest |
|
|
NpgsqlRest.OpenAPI
Automatic HTTP Files Generation for NpgsqlRest |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.3.1 | 15 | 1/13/2026 |
| 3.3.0 | 47 | 1/8/2026 |
| 3.2.7 | 82 | 1/5/2026 |
| 3.2.2 | 205 | 12/24/2025 |
| 3.2.1 | 183 | 12/23/2025 |
| 3.2.0 | 170 | 12/22/2025 |
| 3.1.3 | 162 | 12/21/2025 |
| 3.1.2 | 131 | 12/20/2025 |
| 3.1.1 | 223 | 12/15/2025 |
| 3.1.0 | 117 | 12/13/2025 |
| 3.0.0 | 202 | 11/27/2025 |
| 2.36.2 | 178 | 10/6/2025 |
| 2.36.0 | 186 | 9/29/2025 |
| 2.35.0 | 325 | 9/18/2025 |
| 2.34.0 | 198 | 9/11/2025 |
| 2.33.0 | 230 | 8/29/2025 |
| 2.32.0 | 136 | 8/23/2025 |
| 2.31.0 | 217 | 8/18/2025 |
| 2.30.0 | 185 | 8/9/2025 |
| 2.29.0 | 192 | 7/9/2025 |
| 2.28.0 | 316 | 6/13/2025 |
| 2.27.0 | 213 | 5/19/2025 |
| 2.26.0 | 179 | 5/11/2025 |
| 2.25.0 | 182 | 5/6/2025 |
| 2.24.0 | 208 | 4/28/2025 |
| 2.23.0 | 200 | 4/27/2025 |
| 2.22.0 | 634 | 4/7/2025 |
| 2.21.0 | 518 | 3/24/2025 |
| 2.20.0 | 308 | 3/5/2025 |
| 2.19.0 | 166 | 2/24/2025 |
| 2.18.0 | 162 | 2/23/2025 |
| 2.17.0 | 177 | 1/9/2025 |
| 2.16.1 | 152 | 1/6/2025 |
| 2.16.0 | 148 | 12/30/2024 |
| 2.15.0 | 183 | 12/21/2024 |
| 2.14.0 | 200 | 11/25/2024 |
| 2.13.1 | 179 | 11/23/2024 |
| 2.13.0 | 204 | 11/17/2024 |
| 2.12.1 | 187 | 11/6/2024 |
| 2.12.0 | 167 | 10/30/2024 |
| 2.11.0 | 193 | 9/3/2024 |
| 2.10.0 | 200 | 8/23/2024 |
| 2.9.0 | 144 | 8/2/2024 |
| 2.8.5 | 196 | 6/25/2024 |
| 2.8.4 | 183 | 6/22/2024 |
| 2.8.3 | 189 | 6/11/2024 |
| 2.8.2 | 191 | 6/9/2024 |
| 2.8.1 | 160 | 5/10/2024 |
| 2.8.0 | 178 | 5/2/2024 |
| 2.7.1 | 192 | 4/30/2024 |
| 2.7.0 | 200 | 4/17/2024 |
| 2.6.1 | 193 | 4/16/2024 |
| 2.6.0 | 185 | 4/16/2024 |
| 2.5.0 | 188 | 4/15/2024 |
| 2.4.2 | 209 | 4/14/2024 |
| 2.4.1 | 178 | 4/12/2024 |
| 2.4.0 | 306 | 4/8/2024 |
| 2.3.1 | 175 | 4/5/2024 |
| 2.3.0 | 246 | 4/4/2024 |
| 2.2.0 | 179 | 4/2/2024 |
| 2.1.0 | 201 | 3/29/2024 |
| 2.0.0 | 229 | 3/26/2024 |
| 1.6.3 | 188 | 2/19/2024 |
| 1.6.2 | 188 | 2/3/2024 |
| 1.6.1 | 183 | 2/2/2024 |
| 1.6.0 | 178 | 1/28/2024 |
| 1.5.1 | 170 | 1/27/2024 |
| 1.5.0 | 177 | 1/27/2024 |
| 1.4.0 | 177 | 1/26/2024 |
| 1.3.0 | 181 | 1/23/2024 |
| 1.2.0 | 183 | 1/22/2024 |
| 1.1.0 | 181 | 1/19/2024 |
| 1.0.0 | 187 | 1/18/2024 |
| 0.0.9 | 152 | 1/18/2024 |