Getting started

Learn how to install and get started the CrateDB Python client library.

Table of contents


Python 3.7 is recommended.

However, older versions of Python can still be used.

Pip should be installed on your system.


The CrateDB Python client is available as a PyPI package.

To install the package, run:

sh$ pip install crate

After that is done, you can import the library, like so:

>>> from crate import client

Interactive use

Python provides a REPL, also known as an interactive language shell. It’s a handy way to experiment with code and try out new libraries. We recommend iPython, which you can install, like so:

sh$ pip install iPython

Once installed, you can start it up, like this:

sh$ ipython

From there, try importing the CrateDB Python client library and seeing how far you get with the built-in help() function (that can be called on any object), iPython’s autocompletion, and many other features.

Set up as a dependency

In order to handle Python project dependencies, there are many ways. The official PyPI package should be compatible with all of them.


How helpful was this page?