Closed zleung9 closed 2 years ago
@zhul9311 Yeah the issue is that right now Juan probably setup his own local API key which is read from an environment variable or something. I've gotten some instructions from Joe on how to do this. Once I do, I will post some instructions. For now you need to make the client "interactive" in e.g. a Jupyter notebook.
from tiled.client import from_uri
c = from_uri("https://aimm.lbl.gov/api")
c
The above will prompt you for the ORCID login.
@zhul9311 Ok I've done it. The instructions are really clear: follow this doc, and set the environment variable. Then you never have to enter your API key when using from_uri
.
https://blueskyproject.io/tiled/how-to/api-keys.html
I use oh-my-zsh, but depending on the terminal you're using (let's assume it's terminal that comes with Mac) you'll want to make sure something like this is set so the environment variable is automatically initialized every time you start up the terminal:
# ~/.bashrc
# or in my case, ~/.zshrc
source ~/.bash_profile
# ~/.bash_profile
export TILED_API_KEY=YOUR_KEY_HERE
Let me know if you have any questions! I'll also add these docs to the README
at some point. Feel free to re-open the issue if this doesn't solve the problem.
when executing
client.py
, it raises the following exception from line 117. @jmaruland Do you know what possibly causes this? Or a key is needed to access the database?https://github.com/AI-multimodal/aimm-post-processing/blob/6a07f97279aa8e2fc24988e5ad3889eb5ab18db0/aimm_post_processing/client.py#L117