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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ async def async_query(
## FAQ

#### How do I set my Dune API key?
`spice` looks for a Dune API key in the `DUNE_API_KEY` environment variable.

Set your API key using one of these approaches:

- **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)
- **specify key for single session:** set the 'DUNE_API_KEY' entry in os.environ (e.g. os.environ['DUNE_API_KEY'] = 'your-api-key) with `.env` file
- **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 ...)

#### How do I obtain a Dune API key?

Expand Down
1 change: 1 addition & 0 deletions env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DUNE_API_KEY=your-api-key