A Python cli REPL client for Google Cloud Spanner.
Project description
spanner-cli
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+https://github.com/shoma/spanner-cli
Usage
usage: spanner-cli [-h] -p PROJECT -i INSTANCE [-d DATABASE] [-c CREDENTIAL]
[-e EXECUTE]
A Google Cloud Spanner terminal client with auto-completion and syntax
highlighting.
optional arguments:
-h, --help show this help message and exit
-p PROJECT, --project PROJECT
Google Cloud Platform Project for spanner.
-i INSTANCE, --instance INSTANCE
Google Cloud Spanner instance to connect.
-d DATABASE, --database DATABASE
Google Cloud Spanner Database to connect.
-c CREDENTIAL, --credential CREDENTIAL
path to credential file for Google Cloud Platform.
-e EXECUTE, --execute EXECUTE
Execute command and quit.
https://github.com/shoma/spanner-cli
> 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 https://readline.kablamo.org/emacs.html
Note
- build on top of prompt-toolkit
- inspired by dbcli
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spanner-cli-0.15.0.tar.gz
(13.1 kB
view hashes)
Built Distribution
Close
Hashes for spanner_cli-0.15.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4470beb5a00a014bbd6295b851317cd6ca45471cd58f921a61003388918ad1a8 |
|
MD5 | dc70431ff044f92596791ecc1e138011 |
|
BLAKE2b-256 | 6fd22a4382d1f879f302d8be82aa1b8f1c9b57ba3cffa765497618918befc6be |