nsj-rest-lib
Biblioteca para construção de APIs Rest Python, de acordo com o guidelines interno, e com paradigma declarativo.
What it is and what it does
nsj-rest-lib is a declarative REST API library built on Flask that automates CRUD endpoint generation from DTO (data transfer object) and Entity class definitions. Instead of writing route handlers and database access logic, you define the shape of your data in classes and annotate routes; the library handles GET, POST, PUT, and DELETE operations, field filtering, pagination, and basic data validation. It is designed for Nasajon's internal development patterns—multi-tenant data partitioning, multi-database routing by tenant, audit logging, and telemetry integration—and is intentionally kept lightweight so it can be mixed with manual Flask code rather than dominating the request lifecycle.
The library depends on Flask, SQLAlchemy, database drivers (pg8000, PyMySQL), and several internal Nasajon packages (nsj_gcf_utils, nsj-audit-lib). It supports modern Python versions and is distributed as a pure Python wheel with low install friction. However, the repository is now archived and abandoned, meaning no active maintenance or security updates are expected.
Use it for:
- Rapid prototyping of multi-tenant REST APIs that partition data by tenant and route to different databases per request.
- Building lean CRUD endpoints for internal Nasajon services without writing repetitive route and data-access boilerplate.
- Integrating audit logging and OpenTelemetry telemetry into REST APIs with minimal configuration.
- Combining declarative route scaffolding with custom Flask logic in the same application.
- Generating DTO and Entity classes from database DDL using the companion CLI tool to accelerate API development.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
nsj-rest-lib builds declarative REST APIs for CRUD operations (GET, POST, PUT, DELETE) on top of Flask, using DTO and Entity classes to minimize boilerplate while remaining composable with manual implementations.
No—with conditions only if you are already within a Nasajon environment. The repository is archived and abandoned, meaning no security patches or maintenance will be provided. The license is unclear, internal dependencies may not be publicly available, and the package appears designed for internal use. Install only if you have direct access to Nasajon's internal infrastructure and can verify that all dependencies are available in your environment.
Install
nsj-rest-lib on PyPI
pip
pip install nsj-rest-libuv
uv add nsj-rest-libpoetry
poetry add nsj-rest-libInstalling nsj-rest-lib
Before you install
Low install friction; pure Python wheel. Maintenance is a concern: the repository is archived and abandoned as of the latest commit, with no active development despite recent version releases.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before use in proprietary or copyleft-sensitive projects.
Quickstart
pip install nsj-rest-lib
from nsj_rest_lib import DTO, DTOField, Entity, Controller
@DTO
class MyDTO:
id: int = DTOField()
name: str = DTOField()
# Define Entity, then Controller with @ListRoute, @PostRoute, etc.
Requires Flask and SQLAlchemy as runtime dependencies; also depends on internal Nasajon libraries (nsj_gcf_utils, nsj-audit-lib) that may not be publicly available.
Verify before relying
- Whether internal dependencies (nsj_gcf_utils, nsj-audit-lib) are publicly installable or restricted to Nasajon environments.
- Actual license terms, given the unclear license_treatment in metadata.
- Whether the archived repository status means no security patches or maintenance will be provided going forward.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.4) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — Flask, SQLAlchemy, pg8000, nsj_gcf_utils, PyMySQL, py-healthcheck, unidecode, opentelemetry-exporter-otlp, pyyaml, nsj-audit-lib |
| Maintenance | abandoned — 156 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 137,658/month — #11,362 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: nsj_rest_lib-6.4.1-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
nsj-rest-lib2Generates REST APIs dynamically from…
unclear · top 15,000 on PyPI
nsj-sql-utils-libProvides Python utilities for database access,…
unclear · top 15,000 on PyPI
nsj-queue-libImplements transactional queues and workers…
unclear · top 15,000 on PyPI
nsj-gcf-utilsProvides utility modules for building Google…
unclear · top 15,000 on PyPI
flask-restplusFlask-RESTPlus adds decorators and tools to…
permissive · top 15,000 on PyPI
flask-appbuilderFlask App Builder is a framework that generates…
permissive · top 5,000 on PyPI
flask-restxFlask-RESTX extends Flask with decorators and…
permissive · top 5,000 on PyPI
Flask-RESTfulFlask-RESTful provides decorators and utilities…
permissive · top 5,000 on PyPI
fastapi-restfulProvides utilities and base classes to reduce…
permissive · top 15,000 on PyPI
fastapi-utilsProvides reusable utilities and base classes…
permissive · top 5,000 on PyPI