[PR #902] [CLOSED] Examples directory Reorganization #1070

Closed
opened 2026-02-28 00:03:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/902
Author: @gallacor
Created: 11/28/2022
Status: Closed

Base: masterHead: examples_update


📝 Commits (2)

  • e9e28e8 reorganize and rename examples
  • 9b6ee0f reorganize examples and follow contributions guidlines

📊 Changes

53 files changed (+24 additions, -19 deletions)

View changed files

📝 examples/app.py (+1 -1)
📝 examples/create_operations/add_a_saved_album.py (+0 -0)
📝 examples/create_operations/add_a_saved_track.py (+0 -0)
📝 examples/create_operations/add_tracks_to_playlist.py (+0 -0)
📝 examples/create_operations/create_playlist.py (+0 -0)
📝 examples/create_operations/follow_playlist.py (+11 -7)
📝 examples/delete_operations/delete_a_saved_track.py (+0 -0)
📝 examples/delete_operations/remove_specific_tracks_from_playlist.py (+0 -0)
📝 examples/delete_operations/remove_tracks_from_playlist.py (+0 -0)
📝 examples/delete_operations/unfollow_playlist.py (+0 -0)
📝 examples/read_operations/artist_albums.py (+0 -0)
📝 examples/read_operations/artist_discography.py (+3 -2)
📝 examples/read_operations/artist_recommendations.py (+0 -0)
📝 examples/read_operations/audio_analysis_for_track.py (+0 -0)
📝 examples/read_operations/audio_features.py (+0 -0)
📝 examples/read_operations/audio_features_for_track.py (+0 -0)
📝 examples/read_operations/contains_a_saved_track.py (+0 -0)
📝 examples/read_operations/generate_artist_link.py (+1 -1)
📝 examples/read_operations/my_playlists.py (+1 -1)
📝 examples/read_operations/my_top_artists.py (+0 -0)

...and 33 more files

📄 Description

Motivation behind changes
After working with the Spotipy API I noticed that the examples directory were hard to follow from the perspective of a new user of the project. Since there are so many examples It was overwhelming to find the examples that I was looking for. By organizing the examples into subdirectories in the example folder I believe the project will be easier for newcomers to work with the project. No code within the files have been changed, I have simply renamed the examples simple0, simple1, simple2, simple3, and simple4 to give them more descriptive names and organized each example into a subdirectory of it's respectice CRUD operation. A few of the examples related to setup of the application have been placed into a new setup_examples directory.

Overview of changes

  • create_operations subdirectory includes all the examples related to creating tasks as well as examples that add new items to playlists or library.

  • delete_operations subdirectory includes all examples that delete things from the library as well as examples that remove items from playlists

  • update_operations subdirectory includes all examples that update things in the users library as well as example that update playlists.

  • read_operations subdirectory includes all examples that read data from the user library or search the master Spotify Library

  • setup_examples subdirectory includes all examples related to the setup of the application

  • renamed simple examples to give them more descriptive names

  1. simple0 example is given a more descriptive name of search_tracks_by_artist
  2. simple1 example is given a more descriptive name of search_artist_album_by_url
  3. simple2 example is given a more descriptive name of search_artist_tracks_by_url
  4. simple3 example is given a more descriptive name of generate_artist_link
  5. simple4 example is given a more descriptive name of read_user_details

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spotipy-dev/spotipy/pull/902 **Author:** [@gallacor](https://github.com/gallacor) **Created:** 11/28/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `examples_update` --- ### 📝 Commits (2) - [`e9e28e8`](https://github.com/spotipy-dev/spotipy/commit/e9e28e8955c9b72c57fa7d6d75a9000701c70605) reorganize and rename examples - [`9b6ee0f`](https://github.com/spotipy-dev/spotipy/commit/9b6ee0f224d26b5eb8756538c59cbde1a72feb7b) reorganize examples and follow contributions guidlines ### 📊 Changes **53 files changed** (+24 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `examples/app.py` (+1 -1) 📝 `examples/create_operations/add_a_saved_album.py` (+0 -0) 📝 `examples/create_operations/add_a_saved_track.py` (+0 -0) 📝 `examples/create_operations/add_tracks_to_playlist.py` (+0 -0) 📝 `examples/create_operations/create_playlist.py` (+0 -0) 📝 `examples/create_operations/follow_playlist.py` (+11 -7) 📝 `examples/delete_operations/delete_a_saved_track.py` (+0 -0) 📝 `examples/delete_operations/remove_specific_tracks_from_playlist.py` (+0 -0) 📝 `examples/delete_operations/remove_tracks_from_playlist.py` (+0 -0) 📝 `examples/delete_operations/unfollow_playlist.py` (+0 -0) 📝 `examples/read_operations/artist_albums.py` (+0 -0) 📝 `examples/read_operations/artist_discography.py` (+3 -2) 📝 `examples/read_operations/artist_recommendations.py` (+0 -0) 📝 `examples/read_operations/audio_analysis_for_track.py` (+0 -0) 📝 `examples/read_operations/audio_features.py` (+0 -0) 📝 `examples/read_operations/audio_features_for_track.py` (+0 -0) 📝 `examples/read_operations/contains_a_saved_track.py` (+0 -0) 📝 `examples/read_operations/generate_artist_link.py` (+1 -1) 📝 `examples/read_operations/my_playlists.py` (+1 -1) 📝 `examples/read_operations/my_top_artists.py` (+0 -0) _...and 33 more files_ </details> ### 📄 Description **Motivation behind changes** After working with the Spotipy API I noticed that the examples directory were hard to follow from the perspective of a new user of the project. Since there are so many examples It was overwhelming to find the examples that I was looking for. By organizing the examples into subdirectories in the example folder I believe the project will be easier for newcomers to work with the project. No code within the files have been changed, I have simply renamed the examples simple0, simple1, simple2, simple3, and simple4 to give them more descriptive names and organized each example into a subdirectory of it's respectice CRUD operation. A few of the examples related to setup of the application have been placed into a new setup_examples directory. **Overview of changes** - create_operations subdirectory includes all the examples related to creating tasks as well as examples that add new items to playlists or library. - delete_operations subdirectory includes all examples that delete things from the library as well as examples that remove items from playlists - update_operations subdirectory includes all examples that update things in the users library as well as example that update playlists. - read_operations subdirectory includes all examples that read data from the user library or search the master Spotify Library - setup_examples subdirectory includes all examples related to the setup of the application - renamed simple examples to give them more descriptive names 1. simple0 example is given a more descriptive name of search_tracks_by_artist 2. simple1 example is given a more descriptive name of search_artist_album_by_url 3. simple2 example is given a more descriptive name of search_artist_tracks_by_url 4. simple3 example is given a more descriptive name of generate_artist_link 5. simple4 example is given a more descriptive name of read_user_details --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:03:28 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#1070
No description provided.