mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
Added documentation for windows users attempting to set environment variables (#822)
This commit is contained in:
parent
36ea3d9319
commit
ca73420248
@ -5,10 +5,17 @@ If you would like to contribute to spotipy follow these steps:
|
|||||||
### Export the needed environment variables
|
### Export the needed environment variables
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Linux or Mac
|
||||||
export SPOTIPY_CLIENT_ID=client_id_here
|
export SPOTIPY_CLIENT_ID=client_id_here
|
||||||
export SPOTIPY_CLIENT_SECRET=client_secret_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_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
|
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:
|
### Create virtual environment, install dependencies, run tests:
|
||||||
|
|||||||
@ -132,7 +132,7 @@ class SpotifyOAuth that can be used to authenticate requests like so::
|
|||||||
print(idx, track['artists'][0]['name'], " – ", track['name'])
|
print(idx, track['artists'][0]['name'], " – ", track['name'])
|
||||||
|
|
||||||
or if you are reluctant to immortalize your app credentials in your source code,
|
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)::
|
on Windows)::
|
||||||
|
|
||||||
export SPOTIPY_CLIENT_ID='your-spotify-client-id'
|
export SPOTIPY_CLIENT_ID='your-spotify-client-id'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user