Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scylladb/scylla-cqlsh
A fork of the cqlsh code
https://github.com/scylladb/scylla-cqlsh
cql cqlsh python scylladb
Last synced: 9 days ago
JSON representation
A fork of the cqlsh code
- Host: GitHub
- URL: https://github.com/scylladb/scylla-cqlsh
- Owner: scylladb
- License: apache-2.0
- Created: 2022-03-31T15:31:27.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T11:58:31.000Z (6 months ago)
- Last Synced: 2024-05-22T12:56:27.280Z (6 months ago)
- Topics: cql, cqlsh, python, scylladb
- Language: Python
- Size: 4.24 MB
- Stars: 11
- Watchers: 9
- Forks: 25
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-repositories - scylladb/scylla-cqlsh - A fork of the cqlsh code (Python)
README
# scylla-cqlsh
Command line tool to connect to [scylladb](http://www.scylladb.com) (or Apache Cassandra)
A fork of the cqlsh tool from https://github.com/apache/cassandra
![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/pypi/scylla-cqlsh)
![GitHub branch checks state](https://img.shields.io/github/checks-status/scylladb/scylla-cqlsh/master)
![PyPI](https://img.shields.io/pypi/v/scylla-cqlsh)# Quickstart
```bash
pip install scylla-cqlshcqlsh ${SCYLLA_HOST} -e 'SELECT * FROM system.local'
# or just using it interactively
cqlsh ${SCYLLA_HOST}# or using it with scylla-cloud
cqlsh --cloudconf [path to connection bundle downloaded]# running with docker image interactively
docker run -it scylladb/scylla-cqlsh ${SCYLLA_HOST}
```# Contributing
Feel free to open a PR/issues with suggestion and improvement
Try covering you suggested change with a test, and the instruction
for running tests are below## Testing
Dependent
* python 2.7/3.x (recommend virtualenv)
* minimum java8```bash
pip install -e .
pip install -r pylib/requirements.txt# run scylla with docker
docker run -d scylladb/scylla:latest --cluster-name testexport DOCKER_ID=$(docker run -d scylladb/scylla:latest --cluster-name test)
export CQL_TEST_HOST=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' ${DOCKER_ID})
while ! nc -z ${CQL_TEST_HOST} 9042; do
sleep 0.1 # wait for 1/10 of the second before check again
done
# run scylla with CCM
ccm create cqlsh_cluster -n 1 --scylla --version unstable/master:latest
ccm startpytest
```## Build from source
```bash
pip install build
# optionally can disable the usage of cython
# export CQLSH_NO_CYTHON=true
python -m build -w
...
Successfully built scylla_cqlsh-6.0.24.dev0+gb09bc79361.d20240910-py3-none-any.whl
```## Creation of the repo
A reference on how this we forked out of cassandra repo
So we can repeat the process if we want to bring change back it```bash
git clone -b trunk --single-branch [email protected]:apache/cassandra.git
sudo apt-get install git-filter-repo
cd cassandragit filter-repo --path bin/cqlsh --path bin/cqlsh.py --path pylib/
```