Skip to content

Commit 8fd55e7

Browse files
committed
Move setting PGPASSWORD to %env
1 parent b399bf3 commit 8fd55e7

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

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

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@
1212
"## Prerequisites\n",
1313
"\n",
1414
"You must have:\n",
15+
"* [PostgreSQL](https://www.postgresql.org/)\n",
1516
"* [Python 3](https://www.python.org/)\n",
1617
"* [Jupyter Notebook](https://jupyter.org/install)\n",
1718
"* [Docker](https://docs.docker.com/get-started/get-docker/)\n",
1819
"* [Docker compose](https://docs.docker.com/compose/install/)\n",
1920
"* [curl](https://curl.se)\n",
2021
"* [CipherStash account](https://cipherstash.com/signup)\n",
21-
"* [CipherStash CLI](https://github.com/cipherstash/cli-releases/releases/latest)"
22+
"* [CipherStash CLI](https://github.com/cipherstash/cli-releases/releases/latest)\n",
23+
"\n",
24+
"> Please note that on MS Windows' PowerShell, there is a built-in alias `curl` which is different from [curl listed above](https://curl.se).\n",
25+
"A simple way around this is to start Jupyter Notebook from cmd.exe instead of PowerShell."
2226
]
2327
},
2428
{
@@ -318,7 +322,8 @@
318322
"metadata": {},
319323
"outputs": [],
320324
"source": [
321-
"! curl https://github.com/cipherstash/encrypt-query-language/releases/latest/download/cipherstash-eql.sql | PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres cipherstash_getting_started"
325+
"%env PGPASSWORD=postgres\n",
326+
"! curl https://github.com/cipherstash/encrypt-query-language/releases/latest/download/cipherstash-eql.sql | psql -h localhost -p 5432 -U postgres cipherstash_getting_started"
322327
]
323328
},
324329
{
@@ -336,7 +341,8 @@
336341
"metadata": {},
337342
"outputs": [],
338343
"source": [
339-
"! PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres cipherstash_getting_started < application_types.sql # should output messages like `CREATE DOMAIN`"
344+
"%env PGPASSWORD=postgres \n",
345+
"! psql -h localhost -p 5432 -U postgres cipherstash_getting_started < application_types.sql"
340346
]
341347
},
342348
{
@@ -354,7 +360,8 @@
354360
"metadata": {},
355361
"outputs": [],
356362
"source": [
357-
"! PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres cipherstash_getting_started < create_examples_table.sql"
363+
"%env PGPASSWORD=postgres\n",
364+
"! psql -h localhost -p 5432 -U postgres cipherstash_getting_started < create_examples_table.sql"
358365
]
359366
},
360367
{
@@ -538,7 +545,8 @@
538545
"outputs": [],
539546
"source": [
540547
"# From CipherStash Proxy; you should see plaintext JSONB\n",
541-
"!printf '\\\\x \\n select * from examples limit 1;' | PGPASSWORD=postgres psql -h localhost -p 6432 -U postgres cipherstash_getting_started"
548+
"%env PGPASSWORD=postgres\n",
549+
"!printf '\\\\x \\n select * from examples limit 1;' | psql -h localhost -p 6432 -U postgres cipherstash_getting_started"
542550
]
543551
},
544552
{
@@ -557,7 +565,8 @@
557565
"outputs": [],
558566
"source": [
559567
"# From PostgreSQL; you should see JSONB with encrypted values\n",
560-
"!printf '\\\\x \\n select * from examples limit 1;' | PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres cipherstash_getting_started"
568+
"%env PGPASSWORD=postgres\n",
569+
"!printf '\\\\x \\n select * from examples limit 1;' | psql -h localhost -p 5432 -U postgres cipherstash_getting_started"
561570
]
562571
},
563572
{

0 commit comments

Comments
 (0)