skillfed

nsj-rest-lib

Biblioteca para construção de APIs Rest Python, de acordo com o guidelines interno, e com paradigma declarativo.

nsj-rest-lib v6.4.1 137.7K downloads/30d#11,362 on PyPI0
License unclear Abandoned released

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-lib

uv

uv add nsj-rest-lib

poetry

poetry add nsj-rest-lib

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersProgramming Language :: Python :: 3Topic :: Software Development :: Libraries

Tags

declarative REST API frameworkCRUD API builder PythonFlask REST libraryDTO entity mappingREST API scaffolding
rest-apideclarativemulti-tenant

More Libraries packages