Skip to main content

Optimized Python-Java JDBC bridge with connection pooling, batch execution, async queries, and caching for Informix and MongoDB

Project description

PyPI PyPI - Downloads Build Status License: MIT Último Commit GitHub issues GitHub forks GitHub stars

🧩 wbjdbc v2.0 — JDBC para Python (com suporte a Informix, Pooling, Async e Cache)

wbjdbc é uma biblioteca JDBC moderna e otimizada para Python, agora com recursos de pool de conexões, execução assíncrona, operações em lote, cache de metadados e mapeamento de tipos.
Totalmente compatível com versões anteriores (v1.x) e pronta para produção.


🚀 Principais Recursos

  • 🔄 Pool de Conexões — Gerencia múltiplas conexões com reaproveitamento automático.
  • Execução em Lote — Até 10x mais rápido em inserções/atualizações massivas.
  • 🧵 Execução Assíncrona — Suporte a dezenas de queries simultâneas.
  • 🧠 Cache de Metadados — Reduz 95–99% das consultas de schema repetidas.
  • 🧩 Mapeamento Automático de Tipos — Conversão bidirecional entre JDBC e Python.
  • 🧮 Métricas e Logging Estruturado — Estatísticas detalhadas de desempenho.
  • ⚙️ Configuração via .env ou Variáveis de Ambiente
  • Compatível 100% com versões anteriores

🧰 Instalação

pip install wbjdbc

💡 Uso Básico

from wbjdbc import connect_optimized

conn = connect_optimized(
    db_type="informix-sqli",
    host="server",
    database="db",
    user="user",
    password="pass",
    server="informix"
)

df = conn.query("SELECT * FROM clientes LIMIT 10")
print(df)

⚙️ Execução em Lote

data = [(1, "Alice"), (2, "Bob")]
conn.execute_batch("INSERT INTO clientes VALUES (?, ?)", data)

🧵 Execução Assíncrona

future = conn.execute_async("SELECT COUNT(*) FROM clientes")
print(future.result())

📈 Métricas e Logging

  • Tempo médio, p50, p95 e p99 de queries
  • Estatísticas de pool, cache e conexões
  • Exportação JSON para Prometheus ou Grafana

🔧 Configuração (.env)

DB_TYPE=informix-sqli
DB_HOST=server
DB_DATABASE=db
DB_USER=user
DB_PASSWORD=pass
POOL_MIN=10
POOL_MAX=20
CACHE_TTL=600

🧾 Changelog

v2.0.0

  • Novo pool de conexões (thread-safe)
  • Execução assíncrona e em lote
  • Cache de metadados com invalidação
  • Métricas detalhadas e logs estruturados
  • Total compatibilidade com v1.x

🧑‍💻 Licença

MIT © 2025 Wander Freitas Batista


🇺🇸 wbjdbc v2.0 — JDBC for Python (Informix, Pooling, Async, Caching)

wbjdbc is a modern, optimized JDBC library for Python featuring connection pooling, async queries, batch execution, metadata caching, and type mapping.
Fully production-ready and 100% backward compatible with v1.x.


🚀 Main Features

  • 🔄 Connection Pooling — Efficient, thread-safe connection reuse
  • Batch Execution — 5–10x faster inserts/updates
  • 🧵 Async Query Execution — 50–100 concurrent queries supported
  • 🧠 Metadata Caching — Up to 99% fewer repeated schema queries
  • 🧩 Type Mapping — Automatic JDBC ↔ Python conversions
  • 🧮 Metrics & Structured Logging
  • ⚙️ Environment-based Configuration (.env)
  • 100% Backward Compatible

🧰 Installation

pip install wbjdbc

💡 Basic Usage

from wbjdbc import connect_optimized

conn = connect_optimized(
    db_type="informix-sqli",
    host="server",
    database="db",
    user="user",
    password="pass",
    server="informix"
)

df = conn.query("SELECT * FROM customers LIMIT 10")
print(df)

⚙️ Batch Execution

data = [(1, "Alice"), (2, "Bob")]
conn.execute_batch("INSERT INTO customers VALUES (?, ?)", data)

🧵 Async Execution

future = conn.execute_async("SELECT COUNT(*) FROM customers")
print(future.result())

📊 Metrics & Logging

  • Query latency (avg, p50, p95, p99)
  • Pool and cache statistics
  • JSON export for Prometheus/Grafana

🔧 Configuration Example (.env)

DB_TYPE=informix-sqli
DB_HOST=server
DB_DATABASE=db
DB_USER=user
DB_PASSWORD=pass
POOL_MIN=10
POOL_MAX=20
CACHE_TTL=600

🧾 Changelog

v2.0.0

  • Thread-safe connection pool
  • Async & batch execution
  • Metadata cache with invalidation
  • Detailed metrics and structured logs
  • Full backward compatibility with v1.x

🧑‍💻 License

MIT © 2025 Wander Freitas Batista

Made by a Brazilian Developer 🇧🇷

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wbjdbc-2.0.1.tar.gz (28.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wbjdbc-2.0.1-py3-none-any.whl (29.2 MB view details)

Uploaded Python 3

File details

Details for the file wbjdbc-2.0.1.tar.gz.

File metadata

  • Download URL: wbjdbc-2.0.1.tar.gz
  • Upload date:
  • Size: 28.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for wbjdbc-2.0.1.tar.gz
Algorithm Hash digest
SHA256 8b9d2a73f71ecc5999a2ccba99ffe3d0c0629f4b3268420b1e0aa99c97e460d6
MD5 052d755f0674643622e27e16d6482643
BLAKE2b-256 2f13d26f078dcfac4450f40a1c7ee6600c20427b59fda34fabd9981f526a6b5d

See more details on using hashes here.

File details

Details for the file wbjdbc-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: wbjdbc-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 29.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for wbjdbc-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 697f02efd64fa8af4c6dd88b2d817df359009fa8e038c023e89145b203fffb74
MD5 3bcc964fc54db7298c69449cf48fc049
BLAKE2b-256 df56ab09e58e6c76e0cbf5a3fe6a981f696a57bf13a3210a308f39cde2c7d233

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page