{"id":27188,"library":"nsj-sql-utils-lib","title":"nsj-sql-utils-lib","description":"Biblioteca de utilitários Python para facilitar a implementação de sistemas com acesso a banco de dados (PostgreSQL). Versão atual 2.1.3, mantida ativamente pela Nasajon. Suporta Python >=3.4. Fornece abstrações para conexão, consultas e transações.","status":"active","version":"2.1.3","language":"python","source_language":"en","source_url":"https://github.com/Nasajon/nsj-sql-utils-lib","tags":["sql","utils","database","postgresql"],"install":[{"cmd":"pip install nsj-sql-utils-lib","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"wrong":"from nsj_sql_utils_lib import Geral","symbol":"Geral","correct":"from nsj_sql_utils_lib import Geral"}],"quickstart":{"code":"import os\nfrom nsj_utils.sql_utils import Geral\n\ndb_config = {\n    'host': os.environ.get('DB_HOST', 'localhost'),\n    'port': os.environ.get('DB_PORT', '5432'),\n    'database': os.environ.get('DB_NAME', 'test'),\n    'user': os.environ.get('DB_USER', 'user'),\n    'password': os.environ.get('DB_PASSWORD', 'password')\n}\n\n# Exemplo de consulta sincrona com Geral\ngeral = Geral()\nsql = \"SELECT NOW() as current_time\"\nresult = geral.execute(sql, db_config=db_config)\nprint(result)","lang":"python","description":"Quickstart: configure variáveis de ambiente e execute uma consulta SQL simples."},"warnings":[{"fix":"Use `from nsj_utils.sql_utils import ...`","message":"O nome do pacote PyPI usa hífem (nsj-sql-utils-lib), mas os imports usam underscores (nsj_utils). Não confunda.","severity":"gotcha","affected_versions":"all"},{"fix":"Consulte o changelog no GitHub.","message":"A versão 2.x pode ter breaking changes em relação à 1.x. Verifique a documentação para migração.","severity":"deprecated","affected_versions":"2.0.0+"},{"fix":"Use Python 3.6 ou superior.","message":"A biblioteca requer Python >=3.4, mas versões recentes podem não ser testadas com Python 3.4. Recomenda-se Python 3.6+.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.1.3':25 '3.4':32 'abstraçõ':34 'acesso':17 'ativament':27 'atual':24 'banco':19 'biblioteca':6 'com':16 'conexão':36 'consulta':37 'dado':21 'databas':42 'de':7,14,20 'e':38 'facilitar':11 'fornec':33 'implementação':13 'lib':5 'mantida':26 'nasajon':29 'nsj':2 'nsj-sql-utils-lib':1 'para':10,35 'pela':28 'postgresql':22,43 'python':9,31 'sistema':15 'sql':3,40 'suporta':30 'transaçõ':39 'util':4,41 'utilitário':8 'versão':23","created_at":"2026-05-01T17:44:57.450217+00:00","updated_at":"2026-05-01T17:44:57.450217+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'Geral' from 'nsj_sql_utils_lib' (/tmp/tmpmd00wl62/venv/lib/python3.12/site-packages/nsj_sql_utils_lib/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/Nasajon/nsj-sql-utils-lib","docs":null,"changelog":null,"pypi":"https://pypi.org/project/nsj-sql-utils-lib/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","aws","gcp","azure"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}