aboutsummaryrefslogtreecommitdiffstats
path: root/generate_token.py
diff options
context:
space:
mode:
authorStefan Proell <stefan.proell@cropster.com>2018-02-13 09:36:34 +0000
committerStefan Proell <stefan.proell@cropster.com>2018-02-13 09:36:34 +0000
commit68964bf8f63280f0cb7355108ac1f5e1a62455c9 (patch)
tree8a1032673d7ea0ed6a4c573df31811b260c73a4e /generate_token.py
downloadjupyter-notebook-docker-compose-68964bf8f63280f0cb7355108ac1f5e1a62455c9.tar.gz
jupyter-notebook-docker-compose-68964bf8f63280f0cb7355108ac1f5e1a62455c9.zip
Adds a docker--compose file and an environment file for launching Jupyter Notebooks
Diffstat (limited to 'generate_token.py')
-rwxr-xr-xgenerate_token.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/generate_token.py b/generate_token.py
new file mode 100755
index 0000000..54e3c39
--- /dev/null
+++ b/generate_token.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env sh
+import IPython as IPython
+
+if __name__ == "__main__":
+ print("Generate a access token")
+ from argparse import ArgumentParser
+ parser = ArgumentParser()
+ parser.add_argument("-p",
+ "--password",
+ dest="password",
+ help="The password you want to use for authentication.",
+ required=True)
+ args = parser.parse_args()
+
+ print("\nCopy this line into the .env file:\n")
+ hash = IPython.lib.passwd(args.password)
+ print("ACCESS_TOKEN=" + hash)