nsj-sql-utils-lib
Biblioteca de utilitários Python para facilitar a implementação de sistemas com acesso a banco de dados.
What it is and what it does
nsj-sql-utils-lib is a collection of Python utilities for database operations, centered on simplifying DAO (Data Access Object) implementation and database connection management. It provides adapter classes for PostgreSQL (via psycopg2) and MySQL (via mysql-connector-python), a standalone PostgreSQL connection handler, and a command-line database updater for applying versioned schema migrations from a structured file hierarchy.
The package is designed for teams building systems with direct database access, offering helpers to reduce boilerplate when constructing SELECT, INSERT, and UPDATE statements. The db-updater subcommand allows you to manage database schema changes from a directory structure (functions, scripts, views) and can be invoked via pip or Docker. It depends on SQLAlchemy, sqlparams, and python-logging-loki alongside the database drivers.
Use it for:
- Build DAO classes for PostgreSQL or MySQL without writing repetitive SQL construction code.
- Manage database schema migrations and function deployments using the db-updater CLI with version tracking.
- Wrap existing psycopg2 or MySQL connections in a standardized adapter interface for consistent query building.
- Automate database updates in Docker environments using the provided updater image.
- Centralize database utility logic across multiple projects in a single installed library.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python utilities for database access, including DAO helpers, connection adapters for PostgreSQL and MySQL, and a command-line database updater for managing schema migrations.
Yes, if you need DAO utilities and a lightweight database updater for PostgreSQL or MySQL. The low install friction and absence of known vulnerabilities are positives. However, the aging maintenance status (382 days since last release) and unclear license mean you should verify the license terms and accept slower updates. Not suitable for projects requiring active support or strict license compliance.
Install
nsj-sql-utils-lib on PyPI
pip
pip install nsj-sql-utils-libuv
uv add nsj-sql-utils-libpoetry
poetry add nsj-sql-utils-libInstalling nsj-sql-utils-lib
Before you install
Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 382 days ago—so expect slower response to issues, though the package remains functional for its stated purpose.
License in practice
License status is unclear; no SPDX identifier or raw license text is available. Review the repository before adopting in a commercial or restricted-license context.
Quickstart
pip install nsj-sql-utils-lib
from nsj_sql_utils_lib.dao_util import dbadapter3
adapter = dbadapter3.DbAdapter(connection)
# Use adapter to build DAO queries
Requires one of the runtime database drivers (psycopg2_binary for PostgreSQL, mysql-connector-python for MySQL) to be installed separately.
Verify before relying
- Whether the package is actively maintained or in maintenance-only mode given the 382-day gap since last release.
- Specific Python version compatibility beyond the stated >=3.4 requirement.
- Whether the db-updater CLI is production-ready or still in alpha (classifier shows Development Status :: 3 - Alpha).
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.4) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — psycopg2_binary, SQLAlchemy, sqlparams, mysql-connector-python, python-logging-loki |
| Maintenance | aging — 382 days since the last release |
| First released | |
| Downloads | 134,094/month — #11,487 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: nsj_sql_utils_lib-2.1.3-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-gcf-utilsProvides utility modules for building Google…
unclear · top 15,000 on PyPI
nsj-queue-libImplements transactional queues and workers…
unclear · top 15,000 on PyPI
nsj-rest-libnsj-rest-lib builds declarative REST APIs for…
unclear · top 15,000 on PyPI
postgresProvides a lightweight abstraction layer over…
permissive · top 15,000 on PyPI
nsj-rest-lib2Generates REST APIs dynamically from…
unclear · top 15,000 on PyPI
psycopg2PostgreSQL database adapter for Python that…
copyleft · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
pgdbWraps PostgreSQL connections to return query…
permissive · top 15,000 on PyPI
dbt-postgresdbt-postgres is a dbt adapter that connects dbt…
permissive · top 5,000 on PyPI
mssqlWraps SQLAlchemy and pyodbc to simplify…
permissive · top 15,000 on PyPI