The following projects can be used to implement Python applications using the YugabyteDB YSQL API.

Supported projects

Project Documentation and Guides Latest Driver Version Supported YugabyteDB Version
Yugabyte Psycopg2 Driver (Recommended) Documentation
Reference page
2.9.3 2.8 and above
PostgreSQL Psycopg2 Documentation
Hello World
Reference page
2.9.3 2.8 and above
Project Documentation and Guides Example Apps
SQLAlchemy Documentation Hello World
Django Documentation Hello World

Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations using the Hello World examples.

For fully-runnable code snippets and explanations of common operations, see the example apps. Before running the example apps, make sure you have installed the prerequisites.

For reference documentation, including using projects with SSL, refer to the drivers and ORMs reference pages.


To develop Python applications for YugabyteDB, you need the following:

  • Python
    Ensure your system has Python3 installed. To check the version of Python installed, use the following command:

    python -V

    If not already installed, download and install it from the Python Downloads page.

  • Create a Python project
    Create a python file by adding the .py extension to the filename. A virtual environment is also recommended to keep dependencies required by different projects separate. Make sure pip is also installed in the environment.

  • YugabyteDB cluster

Next steps