Skip to content

cockroachlabs/hello-world-python-sqlalchemy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

This repo contains the source code for a simple Hello World application, written in Python. The app uses the SQLAlchemy ORM framework to connect to an existing CockroachDB cluster.

To run the code:

  1. Start a local CockroachDB cluster, or use CockroachCloud.

  2. From the command line, execute the following:

    python3 main.py
    
  3. Enter the connection string for the cluster.

    Note: The connection string must begin with the prefix cockroachdb and must specify the database to which to connect.

    For example, for a local, demo cluster: cockroachdb://demo:<demo_password>@127.0.0.1:26257/defaultdb?sslmode=require

    For CockroachCloud: cockroachdb://<username>:<password>@<globalhost>:26257/<cluster_name>.defaultdb?sslmode=verify-full&sslrootcert=<certs_dir>/<ca.crt>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages