Skip to content
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

docs: update api key steps #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Evan-Kim2028
Copy link

@Evan-Kim2028 Evan-Kim2028 commented Nov 3, 2024

Added additional documentation for two different ways how to load the API key:

  • .env variable
  • import os and set environment variable
  • export via terminal

@sslivkoff
Copy link
Member

I don't think providing an example .env file is worth the clutter. also want to keep the faq very short and simple to parse

maybe we change

spice looks for a Dune API key in the DUNE_API_KEY environment variable.

to

Set your API key using one of these approaches:

  1. specify key across all sessions: set the DUNE_API_KEY environment variable (e.g. write export DUNE_API_KEY=your-api-key in your ~/.bash_profile)
  2. specify key for single session: set the 'DUNE_API_KEY' entry in os.environ (e.g. os.environ['DUNE_API_KEY'] = 'your-api-key)
  3. specify key per request: use the api_key function variable in python (query(api_key='your-api-key', ...)) or the --api-key argument from the cli (spice --api-key your-api-key ...)

@Evan-Kim2028
Copy link
Author

sure thats a good idea. Updated readme accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants