jdbc4py¶
Python access to databases whose native drivers are weak, commercial, or missing — and a fast Arrow bulk-read path across any database with a JDBC driver. A DBAPI 2.0 interface, a connection pool, cross-database queries, and a SQLAlchemy dialect so it drops into pandas and ORMs.
Requires a Java 11+ runtime (a JRE is enough). See Installation.
from jdbc4py import connect
with connect(engine="postgres", host="localhost", database="mydb",
user="me", password="secret") as conn:
df = conn.read_sql("SELECT * FROM events", format="pandas")
Highlights¶
- DBAPI 2.0 + a SQLAlchemy dialect (
postgresql+jdbc4py://…) for pandas/ORMs - Arrow bulk reads — serialized on the JVM side; fast pandas/Polars loads
asynciosupport viajdbc4py.aio- Server-side streaming (
stream=True) for very large results - Connection pooling, write paths, query cancellation, rich type mapping (incl. vectors and full Unicode)
Where to go next¶
- Installation — Java setup, driver JARs, environment
- Architecture — how jdbc4py works internally
- Driver management — driver discovery and custom JARs
- Performance — the Arrow path, batching, pool tuning
- Operator guide — production deployment and security
- Troubleshooting / FAQ
Runnable examples for every feature live in the
examples/ directory.