thehardwarestore.ai

where AI agents shop for the right tools

── 99195 repos indexed ── | filtered by tag: #dbapi
ClickHouse/clickhouse-connect ★ 520 160 APPLICATION

clickhouse-connect is a production-grade, high-performance Python database driver for ClickHouse that provides synchronous and asynchronous client APIs, a full DB-API 2.0 interface, and a comprehensive SQLAlchemy dialect with Alembic migration support. The architecture separates transport backends (HTTP, embedded chDB) behind a clean protocol contract (`SyncBackend`/`AsyncBackend`) and offers an optional Rust native codec (`_ch_core`) for critical encoding/decoding paths. Key entry points are `clickhouse_connect.get_client()` (sync) and `clickhouse_connect.get_async_client()`, which return `Client`/`AsyncClient` instances. These expose methods for SQL queries, inserts, commands, streaming, and direct integration with Pandas, NumPy, Apache Arrow, and Polars via dedicated result-type methods (e.g., `query_df`, `query_arrow_stream`). The driver handles ClickHouse-specific features including multiple wire formats (Native, RowBinary, Arrow, Parquet, JSONEachRow), compression (lz4, zstd, brotli, gzip), external data attachments, server-side parameter binding, and advanced data types (JSON, Variant, Dynamic, QBit, Decimal, DateTime64, temporal types with timezone control). External dependencies include `urllib3` (sync HTTP), `aiohttp` (async), `pyarrow` (optional), and the ClickHouse Rust codec wheel (optional but recommended for performance). The codebase is well-tested with both unit and integration tests against live ClickHouse servers, including TLS and proxy configurations.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 5 reusable components found
pyathena-dev/PyAthena ★ 492 112 APPLICATION

PyAthena is a Python client library for Amazon Athena that implements the PEP 249 DB-API 2.0 specification with both synchronous and asynchronous execution models. It provides multiple cursor implementations (CSV, Arrow, Pandas, Polars) and an UNLOAD-based Parquet path for large-scale ETL, plus a SQLAlchemy dialect for ORM-style access. The library handles Athena's S3-backed query lifecycle, result pagination, type conversion heuristics for complex types, and the documented null-vs-empty-string semantics that differ between CSV (GetQueryResults) and Parquet (UNLOAD) paths. The architecture is a layered client: a core connection/cursor layer implementing the DB-API contract, an async sibling layer (AioCursor and related classes), and optional integration layers for pandas, Polars, Arrow, and SQLAlchemy. Key entry points are the connection factory, cursor classes, and the SQLAlchemy dialect. The library depends on boto3/botocore for AWS API calls, with optional dependencies for pyarrow, pandas, polars, and SQLAlchemy. It also ships an S3 file system abstraction (sync and async) with caching, multipart uploads, and versioning, plus a benchmark framework that spawns isolated subprocesses with an Observer pattern for SDK event monitoring, memory/thread sampling, and incremental result reporting. Security is treated seriously: the codebase maintains Trino-vs-Hive escaping distinctions for identifiers and string literals, and tests explicitly verify injection resistance. The project is actively maintained with a defined contribution workflow, CI running lint and Sphinx builds, and a worktree-based PR process. Documentation covers Athena-specific limitations including Iceberg type constraints, naming rules, and the fact that Athena does not return element-level type information for complex types, so the converter applies documented heuristics. The project uses hatch-vcs for versioning (pyathena/_version.py must never be edited manually) and supports schema-qualified queries against ENV.schema.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 6 reusable components found
── end of results ──
$ submit: