Skip to main content
https://travis-ci.org/civisanalytics/civis-jupyter-extensions.svg?branch=master

Tools for using the Civis Platform with Jupyter notebooks

Installation and Setup

Run the following commands in a shell:

pip install civis-jupyter-extensions
jupyter nbextension install --py civis_jupyter_ext
jupyter nbextension enable --py civis_jupyter_ext

In order to use the extensions, make sure to have your Civis Platform API key in your local environment as CIVIS_API_KEY.

Magic Commands

To load the magic commands, use the following in ipython or a Jupyter notebook:

%load_ext civis_jupyter_ext

You can also autoload the magic commands every time a notebook is opened by adding:

c.InteractiveShellApp.extensions = ['civis_jupyter_ext']

to your ~/.ipython/profile_default/ipython_config.py.

SQL Queries

To get a table preview, use the cell magic like this:

%%civisquery my-database
select * from dummy.table limit 10;

To return a DataFrame for further processing, use the line magic like this:

df = %civisquery my-database select * from dummy.table;

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

civis-jupyter-extensions-0.1.2.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file civis-jupyter-extensions-0.1.2.tar.gz.

File metadata

File hashes

Hashes for civis-jupyter-extensions-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a2956679661be1bbdf3b1bea588f7f3ff470f1daf80bef245d5a0185f08f7bc0
MD5 a3e0fac6f722b46e4a49b893918eafd2
BLAKE2b-256 3625afaaafaf651d3d74b101ee0dd88fea79b0442b76563c83428ccc455df87a

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.0

2 files

1.1.0

2 files

1.0.0

1 file

0.1.3

1 file

This release

0.1.2 This release

1 file

0.1.1

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page