CQL Kernel for Jupyter based on cqlsh
Project description
A Jupyter kernel for the Apache Cassandra Database
To install::
pip install cql_kernel
python -m cql_kernel.install
To use it, run one of::
ipython notebook
# In the notebook interface, select CQL from the 'New' menu
ipython qtconsole --kernel cql
ipython console --kernel cql
To set the connection hostname:
either set the enviroment variable::
CASSANDRA_HOSTNAME=<hostname>
Or in the kernel.json file for the cql kernel, set it as an env. To find the file type::
jupyter kernelspec list
Below is a sample kernel.json with CASSANDRA_HOSTNAME set::
{"argv": ["/usr/bin/python", "-m", "cql_kernel", "-f", "{connection_file}"], "codemirror_mode": "sql", "display_name": "CQL", "env": {"CASSANDRA_HOST": "mycluster"}, "language": "CQL"}
For details of how this works, see the Jupyter docs on `wrapper kernels
<http://jupyter-client.readthedocs.org/en/latest/wrapperkernels.html>`_, and
Pexpect's docs on the `replwrap module
<http://pexpect.readthedocs.org/en/latest/api/replwrap.html>`_
To install::
pip install cql_kernel
python -m cql_kernel.install
To use it, run one of::
ipython notebook
# In the notebook interface, select CQL from the 'New' menu
ipython qtconsole --kernel cql
ipython console --kernel cql
To set the connection hostname:
either set the enviroment variable::
CASSANDRA_HOSTNAME=<hostname>
Or in the kernel.json file for the cql kernel, set it as an env. To find the file type::
jupyter kernelspec list
Below is a sample kernel.json with CASSANDRA_HOSTNAME set::
{"argv": ["/usr/bin/python", "-m", "cql_kernel", "-f", "{connection_file}"], "codemirror_mode": "sql", "display_name": "CQL", "env": {"CASSANDRA_HOST": "mycluster"}, "language": "CQL"}
For details of how this works, see the Jupyter docs on `wrapper kernels
<http://jupyter-client.readthedocs.org/en/latest/wrapperkernels.html>`_, and
Pexpect's docs on the `replwrap module
<http://pexpect.readthedocs.org/en/latest/api/replwrap.html>`_
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cql_kernel-0.2.tar.gz
(87.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cql_kernel-0.2.tar.gz.
File metadata
- Download URL: cql_kernel-0.2.tar.gz
- Upload date:
- Size: 87.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d48d9208dcc3bc22bea2bcd5f9ceacad717399ca3088368831c81c7a6317a649
|
|
| MD5 |
8621b25427b610c79b678e9dd063c713
|
|
| BLAKE2b-256 |
a75dd967bceee33e8e8fcb8f9abc79d8a321bac3da4252c6a599f4eb086c6496
|
File details
Details for the file cql_kernel-0.2.macosx-10.10-x86_64.tar.gz.
File metadata
- Download URL: cql_kernel-0.2.macosx-10.10-x86_64.tar.gz
- Upload date:
- Size: 340.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f67c8b11c0da77c554e6a643ca7a871950e6a57fac434f89f456e6465c73392c
|
|
| MD5 |
5dfcc40179492f0322aaade3c67fe4dc
|
|
| BLAKE2b-256 |
2298cd8af4feabdb74dc48986dd005f1fbf843d4fc66c21198142a8fac6b2a2a
|