Skip to content

Commit

Permalink
Added documentation for windows users attempting to set environment v…
Browse files Browse the repository at this point in the history
…ariables (#822)
  • Loading branch information
raibarra04 committed Jun 18, 2022
1 parent 36ea3d9 commit ca73420
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ If you would like to contribute to spotipy follow these steps:
### Export the needed environment variables

```bash
# Linux or Mac
export SPOTIPY_CLIENT_ID=client_id_here
export SPOTIPY_CLIENT_SECRET=client_secret_here
export SPOTIPY_CLIENT_USERNAME=client_username_here # This is actually an id not spotify display name
export SPOTIPY_REDIRECT_URI=http://localhost:8080 # Make url is set in app you created to get your ID and SECRET

# Windows
$env:SPOTIPY_CLIENT_ID="client_id_here"
$env:SPOTIPY_CLIENT_SECRET="client_secret_here"
$env:SPOTIPY_CLIENT_USERNAME="client_username_here"
$env:SPOTIPY_REDIRECT_URI="http://localhost:8080"
```

### Create virtual environment, install dependencies, run tests:
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class SpotifyOAuth that can be used to authenticate requests like so::
print(idx, track['artists'][0]['name'], " – ", track['name'])

or if you are reluctant to immortalize your app credentials in your source code,
you can set environment variables like so (use ``SET`` instead of ``export``
you can set environment variables like so (use ``$env:"credentials"`` instead of ``export``
on Windows)::

export SPOTIPY_CLIENT_ID='your-spotify-client-id'
Expand Down

0 comments on commit ca73420

Please sign in to comment.