ipython-iris-magic
Project description
ipython-iris-magic
%%iris magic for IPython, can run ObjectScript command in Notebooks.
It can be run in any Notebook and does not require any special setup on IRIS or the Notebook.
Demo
As you can see, the first line load the magic, the second line connect to the server, the third line run the ObjectScript command.
All of this demo is in the example/Notebooks/Demo-Iris-Magic.ipynb
To run the demo run the following command in the root of the project:
docker-compose up
Then go to this url: http://127.0.0.1:8888/notebooks/Demo-Iris-Magic.ipynb
Load the magic
%load_ext iris_magic
Connect to the server
%%iris iris://superuser:SYS@localhost:1972/USER
Run the ObjectScript command
%%iris
Set x = 1
Write x
You can also use the magic to run SQL query.
Load the magic
%load_ext sql
/!\ You need to install the sql extension first.
The sql extension is not part of the standard IPython installation. You can install it with the following command:
pip install ipython-sql
Connect to the server
%sql iris://superuser:SYS@localhost:1972/USER
Run the SQL query
%sql SELECT 1
Installation
In order to use this magic, you need to install the ipython-iris-magic package.
pip install ipython-iris-magic
All the dependencies will be installed automatically.
Usage
%load_ext iris_magic
%%iris iris://superuser:SYS@localhost:1972/USER
set test = "toto"
zw test
Output:
test="toto"
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
Built Distribution
Hashes for ipython_iris_magic-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72f4b9a959f1a29d30174f07bf8bca7b3fce85632552f0c8a6d77451030f0645 |
|
MD5 | fba6fb797e9068edf0545331c806fa43 |
|
BLAKE2b-256 | 8cbf8ba910f3be5282ac897b202267937e571e804261de2b0a6ce403f756ea82 |