Skip to main content

A Python cli REPL client for Google Cloud Spanner.

Project description


image image

A Terminal Client for Google Cloud Spanner with Completion and Syntax Highlighting.

Quick Start

pip3 install -U --user spanner-cli

or, for the latest develop version

pip3 install -U --user git+


Usage: spanner-cli [OPTIONS]

  A Google Cloud Spanner terminal client with auto-completion and syntax

  -p, --project TEXT     Google Cloud Platform Project for spanner.
                         ${GCP_PROJECT}  [required]
  -i, --instance TEXT    Google Cloud Spanner instance to connect.
                         ${SPANNER_INSTANCE_ID}  [required]
  -d, --database TEXT    Google Cloud Spanner Database to connect.
                         ${SPANNER_DATABASE}  [required]
  -c, --credential PATH  path to credential file for Google Cloud Platform.
  --pager / --no-pager   use ${PAGER} (default LESS) to print output.
                         [default: False]
  -e, --execute TEXT     Execute command and quit.
  -v, --version          show version.
  --debug                Debug mode.
  --help                 Show this message and exit.
> help
| Command(abbr)  | Shortcut and Usage    | Description                                  |
| use            | \u                    | Change to a new database.                    |
| SHOW TABLES    | \lt                   | List tables.                                 |
| DESCRIBE       | \dt[+], desc [table]  | Describe table.                              |
| SHOW INDEX     |                       | Show Index (from Table).                     |
| SHOW DATABASES | \l                    | List databases in current instance.          |
| browse         |                       | Open Google Spanner console in your browser. |
| help           | \?                    | Show this help.                              |
| exit           | \q                    | Exit.                                        |

And, you can also edit query with readline's keybindings. see


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for spanner-cli, version 0.18.0
Filename, size File type Python version Upload date Hashes
Filename, size spanner_cli-0.18.0-py3-none-any.whl (16.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size spanner-cli-0.18.0.tar.gz (14.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page