-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Api token 79 #90
Api token 79 #90
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment, but overall, looks good!
Co-authored-by: Vincent Russo <vincentrusso1@gmail.com>
Okay, I figured it could've done better. Thank you for the review! |
README.md
Outdated
@@ -26,7 +26,13 @@ following example script from `metriq-client/examples/metriq_hello.py`: | |||
```python | |||
from metriq import MetriqClient | |||
|
|||
client = MetriqClient(token="[Get this token from your web app account, and replace this string with it.]") | |||
You will need to create an environment variable `` to store the Metriq API key. On Linux/Unix operating systems, you can run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, I'm suggesting we put this comment outside of the code block. So for instance, you would have:
You will need to create an environment variable METRIQ_CLIENT_API_KEY
to store the Metriq API key. On Linux/Unix operating systems, you can run
export METRIQ_CLIENT_API_KEY=<the key you get from the website>
in your terminal. On Windows, you can similarly add this variable as an environment variable. Once you have created the environment variable, you can verify that the client works as follows:
from metriq import MetriqClient
client = MetriqClient(token=os.environ["METRIQ_CLIENT_API_KEY"])
print(client.hello())
>>> {'status': 'API is working', 'message': 'This is the Metriq public REST API.'}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, I'm suggesting we put this comment outside of the code block. So for instance, you would have:
You will need to create an environment variable METRIQ_CLIENT_API_KEY
to store the Metriq API key. On Linux/Unix operating systems, you can run
export METRIQ_CLIENT_API_KEY=<the key you get from the website>
in your terminal. On Windows, you can similarly add this variable as an environment variable. Once you have created the environment variable, you can verify that the client works as follows:
from metriq import MetriqClient
client = MetriqClient(token=os.environ["METRIQ_CLIENT_API_KEY"])
print(client.hello())
>>> {'status': 'API is working', 'message': 'This is the Metriq public REST API.'}
Apologies for the delay. This is it updated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Approved.
This should be the completed issue 79. Please let me know if anything needs to be changed (Especially the README)