NpgsqlRest 3.3.0
See the version list below for details.
dotnet add package NpgsqlRest --version 3.3.0
NuGet\Install-Package NpgsqlRest -Version 3.3.0
<PackageReference Include="NpgsqlRest" Version="3.3.0" />
<PackageVersion Include="NpgsqlRest" Version="3.3.0" />
<PackageReference Include="NpgsqlRest" />
paket add NpgsqlRest --version 3.3.0
#r "nuget: NpgsqlRest, 3.3.0"
#:package NpgsqlRest@3.3.0
#addin nuget:?package=NpgsqlRest&version=3.3.0
#tool nuget:?package=NpgsqlRest&version=3.3.0
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.
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
- TypeScript Code Generation - Auto-generate type-safe frontend code with full static type checking
- 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
Quick Start
1. Annotate a PostgreSQL Function
create function hello(_name text)
returns text
language sql as $$
select 'Hello, ' || _name
$$;
comment on function hello(text) is 'HTTP GET /hello';
2. Configure Connection
Create appsettings.json:
{
"ConnectionStrings": {
"Default": "Host=localhost;Port=5432;Database=my_db;Username=postgres;Password=postgres"
}
}
3. Run
# Download from releases, or:
npm i npgsqlrest && npx npgsqlrest
# Or with Docker:
docker run -p 8080:8080 -v ./appsettings.json:/app/appsettings.json vbilopav/npgsqlrest:latest
Your API is now live at http://localhost:8080/hello?name=World
Installation Options
| 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.11.1 | 36 | 3/13/2026 |
| 3.11.0 | 89 | 3/10/2026 |
| 3.10.0 | 101 | 2/25/2026 |
| 3.8.0 | 172 | 2/11/2026 |
| 3.7.0 | 129 | 2/7/2026 |
| 3.6.2 | 99 | 2/2/2026 |
| 3.6.1 | 93 | 2/2/2026 |
| 3.6.0 | 101 | 2/1/2026 |
| 3.5.0 | 93 | 1/28/2026 |
| 3.4.8 | 97 | 1/26/2026 |
| 3.4.7 | 96 | 1/21/2026 |
| 3.4.6 | 115 | 1/21/2026 |
| 3.4.5 | 109 | 1/19/2026 |
| 3.4.4 | 102 | 1/17/2026 |
| 3.4.3 | 105 | 1/16/2026 |
| 3.4.2 | 95 | 1/15/2026 |
| 3.4.1 | 94 | 1/15/2026 |
| 3.4.0 | 97 | 1/15/2026 |
| 3.3.1 | 100 | 1/13/2026 |
| 3.3.0 | 108 | 1/8/2026 |