This repo has a simple CRUD Python application that uses the asyncpg driver.
To run this example you must have:
- Python 3
- A CockroachDB cluster v23.1 or greater
In a terminal run the following command:
pip install -r requirements.txt
In a terminal set a DATABASE_URL
environment variable to the connection URL for your CockroachDB cluster.
For example on Mac and Linux:
export DATABASE_URL='<connection URL>'
To run the example, in a terminal run the following command:
python3 example.py