Skip to content

Add Python 3 + psycopg2 + Jupyter Notebook example #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,118 changes: 1,118 additions & 0 deletions languages/python/jupyter_notebook/CipherStash-Getting-Started.ipynb

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions languages/python/jupyter_notebook/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# EQL example for Python 3 and Jupyter Notebook

## Prerequisites

* Python 3
* psycopg2
* Jupyter Notebook
* Docker
* Docker compose
* CipherStash account
* CipherStash CLI

## Running / Development

In this directory, run:

```shell
jupyter notebook
```

and open `CipherStash-Getting-Started.ipynb`. Follow the instructions within.

51 changes: 51 additions & 0 deletions languages/python/jupyter_notebook/application_types.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
--
-- Application-specific types
--

CREATE DOMAIN examples__encrypted_big_int AS cs_encrypted_v1
CHECK(
VALUE#>>'{i,t}' = 'examples' AND
VALUE#>>'{i,c}' = 'encrypted_big_int'
);

CREATE DOMAIN examples__encrypted_boolean AS cs_encrypted_v1
CHECK(
VALUE#>>'{i,t}' = 'examples' AND
VALUE#>>'{i,c}' = 'encrypted_boolean'
);

CREATE DOMAIN examples__encrypted_date AS cs_encrypted_v1
CHECK(
VALUE#>>'{i,t}' = 'examples' AND
VALUE#>>'{i,c}' = 'encrypted_date'
);

CREATE DOMAIN examples__encrypted_float AS cs_encrypted_v1
CHECK(
VALUE#>>'{i,t}' = 'examples' AND
VALUE#>>'{i,c}' = 'encrypted_float'
);

CREATE DOMAIN examples__encrypted_int AS cs_encrypted_v1
CHECK(
VALUE#>>'{i,t}' = 'examples' AND
VALUE#>>'{i,c}' = 'encrypted_int'
);

CREATE DOMAIN examples__encrypted_small_int AS cs_encrypted_v1
CHECK(
VALUE#>>'{i,t}' = 'examples' AND
VALUE#>>'{i,c}' = 'encrypted_small_int'
);

CREATE DOMAIN examples__encrypted_utf8_str AS cs_encrypted_v1
CHECK(
VALUE#>>'{i,t}' = 'examples' AND
VALUE#>>'{i,c}' = 'encrypted_utf8_str'
);

CREATE DOMAIN examples__encrypted_jsonb AS cs_encrypted_v1
CHECK(
VALUE#>>'{i,t}' = 'examples' AND
VALUE#>>'{i,c}' = 'encrypted_jsonb'
);
Loading