Skip to content

Commit 38c3cec

Browse files
authored
Merge pull request #7 from cipherstash/cip-796-test-stack-python-psycopg2-jupyter-notebook-greenfields
Add Python 3 + psycopg2 + Jupyter Notebook example
2 parents 1fb6bac + 2f8e853 commit 38c3cec

10 files changed

+2610
-0
lines changed

languages/python/jupyter_notebook/CipherStash-Getting-Started.ipynb

+1,118
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# EQL example for Python 3 and Jupyter Notebook
2+
3+
## Prerequisites
4+
5+
* Python 3
6+
* psycopg2
7+
* Jupyter Notebook
8+
* Docker
9+
* Docker compose
10+
* CipherStash account
11+
* CipherStash CLI
12+
13+
## Running / Development
14+
15+
In this directory, run:
16+
17+
```shell
18+
jupyter notebook
19+
```
20+
21+
and open `CipherStash-Getting-Started.ipynb`. Follow the instructions within.
22+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
--
2+
-- Application-specific types
3+
--
4+
5+
CREATE DOMAIN examples__encrypted_big_int AS cs_encrypted_v1
6+
CHECK(
7+
VALUE#>>'{i,t}' = 'examples' AND
8+
VALUE#>>'{i,c}' = 'encrypted_big_int'
9+
);
10+
11+
CREATE DOMAIN examples__encrypted_boolean AS cs_encrypted_v1
12+
CHECK(
13+
VALUE#>>'{i,t}' = 'examples' AND
14+
VALUE#>>'{i,c}' = 'encrypted_boolean'
15+
);
16+
17+
CREATE DOMAIN examples__encrypted_date AS cs_encrypted_v1
18+
CHECK(
19+
VALUE#>>'{i,t}' = 'examples' AND
20+
VALUE#>>'{i,c}' = 'encrypted_date'
21+
);
22+
23+
CREATE DOMAIN examples__encrypted_float AS cs_encrypted_v1
24+
CHECK(
25+
VALUE#>>'{i,t}' = 'examples' AND
26+
VALUE#>>'{i,c}' = 'encrypted_float'
27+
);
28+
29+
CREATE DOMAIN examples__encrypted_int AS cs_encrypted_v1
30+
CHECK(
31+
VALUE#>>'{i,t}' = 'examples' AND
32+
VALUE#>>'{i,c}' = 'encrypted_int'
33+
);
34+
35+
CREATE DOMAIN examples__encrypted_small_int AS cs_encrypted_v1
36+
CHECK(
37+
VALUE#>>'{i,t}' = 'examples' AND
38+
VALUE#>>'{i,c}' = 'encrypted_small_int'
39+
);
40+
41+
CREATE DOMAIN examples__encrypted_utf8_str AS cs_encrypted_v1
42+
CHECK(
43+
VALUE#>>'{i,t}' = 'examples' AND
44+
VALUE#>>'{i,c}' = 'encrypted_utf8_str'
45+
);
46+
47+
CREATE DOMAIN examples__encrypted_jsonb AS cs_encrypted_v1
48+
CHECK(
49+
VALUE#>>'{i,t}' = 'examples' AND
50+
VALUE#>>'{i,c}' = 'encrypted_jsonb'
51+
);

0 commit comments

Comments
 (0)