--- id: cassandra-driver version: "3.30.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # cassandra-driver — Apache Cassandra Python Driver License: permissive · Maintenance: active · Downloads: 8.8M/mo ## What it is and what it does cassandra-driver is the official Apache Cassandra Python client, maintained by DataStax. It provides both synchronous and asynchronous APIs for executing CQL queries against Cassandra clusters, with built-in connection pooling, automatic node discovery, and configurable load balancing and retry policies. The driver handles the binary protocol communication directly and supports prepared statements, batch operations, and concurrent execution utilities. The package includes an integrated object mapper (cqlengine) for mapping Python classes to Cassandra tables, making it suitable for both low-level query control and higher-level ORM workflows. It supports DataStax Astra (cloud), DSE Graph execution, geometric type serialization, and multiple authentication schemes. Runtime dependencies are minimal (geomet and Deprecated), keeping the footprint lean. Use it for: - Building Python applications that query and write to Apache Cassandra or DataStax Enterprise clusters using CQL. - Implementing object-relational mapping for Cassandra tables via cqlengine without a separate ORM library. - Executing asynchronous batch operations and concurrent queries to maximize throughput in data pipelines. - Connecting to DataStax Astra cloud databases from Python applications. - Handling automatic failover and reconnection in distributed Cassandra deployments. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python client library for Apache Cassandra and DataStax Enterprise that provides synchronous and asynchronous APIs for executing CQL queries, managing connections, and mapping objects to database tables. Yes. cassandra-driver is the official, actively maintained client for Cassandra in Python, with no known vulnerabilities, permissive licensing, and broad platform support. Install friction is moderate but manageable via prebuilt wheels. Choose it if you need to query Cassandra or DSE; it is the standard choice for this use case. ## Install pip install cassandra-driver uv add cassandra-driver poetry add cassandra-driver ## Installing cassandra-driver Before you install: Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.10, 3.11, 3.12, and 3.13 on macOS (Intel and ARM), Linux (x86_64 and aarch64), and Windows. Active maintenance with a recent release 39 days ago and ongoing repository activity. License in practice: Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions; suitable for proprietary projects. Quickstart: pip install cassandra-driver from cassandra.cluster import Cluster cluster = Cluster(['localhost']) session = cluster.connect() rows = session.execute('SELECT * FROM system.local') for row in rows: print(row) Requires a running Cassandra (2.1+) or DataStax Enterprise (4.7+) instance accessible on the network; Python 3.10 or later required. Verify before relying: - Whether the object mapper (cqlengine) is production-ready for all use cases or has known limitations. - Performance characteristics under high concurrency or large result sets compared to alternatives. - Support status for PyPy beyond the classifier listing. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 8.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags cassandra python client, cql query driver, cassandra connection pooling, async cassandra queries, cassandra orm mapper, dse python driver, cassandra batch statements, cassandra, distributed-database, async-io [View on SkillFed](https://skillfed.io/packages/cassandra-driver) · [View on PyPI](https://pypi.org/project/cassandra-driver/)