Cassandra.ToolsAboutKnowledge Base

Python Driver

datastax/python-driver (1227)
License:Apache 2.0

DataStax Driver for Apache Cassandra

.. image:: :target:

A modern, feature-rich <>_ and highly-tunable Python client library for Apache Cassandra (2.1+) and DataStax Enterprise (4.7+) using exclusively Cassandra's binary protocol and Cassandra Query Language v3.

The driver supports Python 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8.

Note: DataStax products do not support big-endian systems.


  • Synchronous <>_ and Asynchronous <>_ APIs
  • Simple, Prepared, and Batch statements <>_
  • Asynchronous IO, parallel execution, request pipelining
  • Connection pooling <>_
  • Automatic node discovery
  • Automatic reconnection <>_
  • Configurable load balancing <>_ and retry policies <>_
  • Concurrent execution utilities <>_
  • Object mapper <>_
  • Connecting to DataStax Astra database (cloud) <>_
  • DSE Graph execution API
  • DSE Geometric type serialization
  • DSE PlainText and GSSAPI authentication


Installation through pip is recommended::

$ pip install cassandra-driver

For more complete installation instructions, see the installation guide <>_.


The documentation can be found online here <>_.

A couple of links for getting up to speed:

  • Installation <>_
  • Getting started guide <>_
  • API docs <>_
  • Performance tips <>_

Object Mapper

cqlengine (originally developed by Blake Eggleston and Jon Haddad, with contributions from the community) is now maintained as an integral part of this package. Refer to documentation here <>_.


See <>_.

Reporting Problems

Please report any bugs and make any feature requests on the JIRA <>_ issue tracker.

If you would like to contribute, please feel free to open a pull request.

Getting Help

Your best options for getting help with the driver are the mailing list <!forum/python-driver-user>_ and the DataStax Community <>_.


Copyright DataStax, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

© 2020 Anant Corporation, All Rights Reserved. All logos, trademarks and registered trademarks are the property of their respective owners.