diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-11-19 13:48:24 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-11-19 13:48:24 -0800 |
commit | 9792a49572e98ac686bd42d307206fac1d723e20 (patch) | |
tree | 3ff2e5bfef9e6d5c77fe012291a0c7bcf1a30880 /python/shell.py | |
parent | f47260eff9e5905e412d33126607fbe0eadcde68 (diff) | |
download | fatcat-9792a49572e98ac686bd42d307206fac1d723e20.tar.gz fatcat-9792a49572e98ac686bd42d307206fac1d723e20.zip |
example shell interface for fatcat python lib
Diffstat (limited to 'python/shell.py')
-rw-r--r-- | python/shell.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/python/shell.py b/python/shell.py new file mode 100644 index 00000000..7b795b4e --- /dev/null +++ b/python/shell.py @@ -0,0 +1,40 @@ + +# bunch of libraries one might want +import uuid +import datetime +import requests +import argparse + +import fatcat_client +from fatcat_client import * +from fatcat_tools import * + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument('--debug', + action='store_true', + help="enable debugging interface") + + args = parser.parse_args() + + #api = + print(" __ _ _ _ ") + print(" / _| __ _| |_ ___ __ _| |_| |") + print("| |_ / _` | __/ __/ _` | __| |") + print("| _| (_| | || (_| (_| | |_|_|") + print("|_| \__,_|\__\___\__,_|\__(_)") + print() + + admin_id = "aaaaaaaaaaaabkvkaaaaaaaaae" + + local_conf = fatcat_client.Configuration() + local_conf.host = 'http://localhost:9411/v0' + local_api = fatcat_client.DefaultApi(fatcat_client.ApiClient(local_conf)) + + prod_conf = fatcat_client.Configuration() + prod_conf.host = 'https://api.fatcat.wiki/v0' + prod_api = fatcat_client.DefaultApi(fatcat_client.ApiClient(prod_conf)) + + qa_conf = fatcat_client.Configuration() + qa_conf.host = 'https://api.qa.fatcat.wiki/v0' + qa_api = fatcat_client.DefaultApi(fatcat_client.ApiClient(qa_conf)) |