Metadata-Version: 2.1
Name: postgres-kernel
Version: 0.2.1
Summary: A PostgreSQL kernel for IPython
Home-page: https://github.com/bgschiller/postgres_kernel
Author: Brian Schiller
Author-email: bgschiller@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Framework :: IPython
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Shells
Requires-Dist: psycopg2 (>=2.6)
Requires-Dist: tabulate (>=0.7.5)
Requires-Dist: jupyter-client
Requires-Dist: ipykernel

# A simple Jupyter kernel for PostgreSQL

Install with `pip install postgres_kernel`

To use, run one of:

```bash
jupyter notebook
# In the notebook interface, select PostgreSQL from the 'New' menu
jupyter qtconsole --kernel postgres
jupyter console --kernel postgres
```

## How to use:

There are a couple of specially formatted comments for controlling the connection string and autocommit mode.

```sql
-- connection: postgres://brian:password@localhost:5432/dbname
-- autocommit: true
-- (or false)
```

For details of how this works, see Jupyter's docs on [wrapper kernels](http://jupyter-client.readthedocs.io/en/latest/wrapperkernels.html).
This is heavily based on [takluyver/bash_kernel](https://github.com/takluyver/bash_kernel). Just look at our git log :)

![](images/console.png)

![](images/notebook.png)


Related
-------

- Catherine Devlin has an ipython magic that seems very full featured: [catherinedevlin/ipython-sql](https://github.com/catherinedevlin/ipython-sql)

- As noted, this is based on [takluyver/bash_kernel](https://github.com/takluyver/bash_kernel)


