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

Added env_variable_setup.rst walkthrough and images #1056

Open
wants to merge 4 commits into
base: master
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased

### Added

- Added `MemcacheCacheHandler`, a cache handler that stores the token info using pymemcache.
- Added support for audiobook endpoints: get_audiobook, get_audiobooks, and get_audiobook_chapters.
- Added integration tests for audiobook endpoints.
Expand All @@ -17,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added Troubleshooting Tips section to TUTORIAL.md to address common installation issues.
- Added link to Spotipy Tutorial for Beginners under Getting Started.
- Added `update` field to `current_user_follow_playlist`.
- Added env_variable_setup.rst to docs and associated images to docs/images. This is a written walkthrough based on the environment variable authentication tutorial video.

### Changed
- Changes the YouTube video link for authentication tutorial (the old video was in low definition, the new one is in high definition)
Expand Down
81 changes: 81 additions & 0 deletions docs/env_variable_setup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
.. container:: WordSection1

Spotipy Environment Variables Setup Walkthrough for MacOS

**Description**

This document will walk you through setting up the SPOTIPY_CLIENT_ID
and SPOTIPY_CLIENT_SECRET environment variables necessary for use of
the Spotipy Python library. Note: This tutorial assumes you have
Python3 installed on your system. If you do not, please go to
`Python <https://www.python.org/>`_ and install that first.

**Getting Started**

- Open ‘Terminal’ or your favorite terminal emulator

- Navigate to your preferred working directory and run the following command:

- python3 -m venv tutorial-env

- Confirm that this has created a folder called “tutorial-env”

.. image:: images/image001.png

- Now run the following command from to activate the virtual environment

- source tutorial-env/bin/activate

.. image:: images/image002.png

- Now install Spotipy with the following command

- python3 -m pip install spotipy

.. image:: images/image003.png

- Log into your Spotify Developer dashboard

- `Spotify Developer Dashboard <https://developer.spotify.com/dashboard>`_

.. image:: images/image004.png

- Click the ‘Create App’ button and fill out the forms with your desired information. For “Redirect URI”, we can use 'https://localhost:8888/callback'

.. image:: images/image005.png

- Click ‘Save’

- You can now see the app home screen

.. image:: images/image006.png

- Click ‘Settings’ to get to the app settings page

.. image:: images/image007.png

- Copy down the Client ID and Client Secret (click ‘View Client Secret’ to view)

- Back in Terminal, in the same working directory as before, run the following commands with the codes (the text after the equal sign) replaced with your own ID and SECRET codes

- export SPOTIPY_CLIENT_ID=6c12c5b29cde4f4593613521eb850e64

- export SPOTIPY_CLIENT_SECRET=ddeb6f49904b4b799d7e9bf233e21b4a

- export SPOTIPY_REDIRECT_URI=https://localhost:8888/callback

.. image:: images/image008.png

- Note: You won’t get any text confirmation after running the commands

- You can confirm that the values took hold with the following commands

- echo $SPOTIPY_CLIENT_ID

- echo $SPOTIPY_CLIENT_SECRET

- echo $SPOTIPY_REDIRECT_URI

.. image:: images/image009.png

Your environment variables are now configured to work with the Spotipy API!
Binary file added docs/images/image001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/image002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/image003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/image004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/image005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/image006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/image007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/image008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/image009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading