[GH-ISSUE #934] Compact python examples into a notebook #560

Closed
opened 2026-02-27 23:23:21 +03:00 by kerem · 5 comments
Owner

Originally created by @mase-git on GitHub (Jan 23, 2023).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/934

Is your feature request related to a problem? Please describe.
No, it is a feature to organize examples scripts in a more efficient way according to my point of view.

Describe the solution you'd like
Actually, examples folder is a list of scripts that test some functions of Spotipy. I think that there is not an actual intuitive 1:1 direct reference between implemented functions and its application. A possible solution is a compact and well-formatted examples snippets into a jupyter notebook. It can also provide an initial index where you can find the a sections descriptions and find easily the function application needed using internal links (anchors in html would be enough).

Describe alternatives you've considered
The notebook could also be divided into different files, we can arrange functions according to the type of information we want to retrieve (tracks, artists, profiles...). However, I think that this alternative solution is a bit hard to do, caused by the multiple usages of a single function type (for instance: the search function can be used to retrieves a lot of different information).

Additional context
We can use an initial table of contents for a better navigation over the notebook. So, each example can be directly referred by an internal link.

Originally created by @mase-git on GitHub (Jan 23, 2023). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/934 **Is your feature request related to a problem? Please describe.** No, it is a feature to organize examples scripts in a more efficient way according to my point of view. **Describe the solution you'd like** Actually, examples folder is a list of scripts that test some functions of Spotipy. I think that there is not an actual intuitive 1:1 direct reference between implemented functions and its application. A possible solution is a compact and well-formatted examples snippets into a jupyter notebook. It can also provide an initial index where you can find the a sections descriptions and find easily the function application needed using internal links (anchors in html would be enough). **Describe alternatives you've considered** The notebook could also be divided into different files, we can arrange functions according to the type of information we want to retrieve (tracks, artists, profiles...). However, I think that this alternative solution is a bit hard to do, caused by the multiple usages of a single function type (for instance: the[ search function](https://github.com/spotipy-dev/spotipy/blob/262e7a0443ece48ce6825f97ad9a3ed205ceb725/spotipy/client.py#L546) can be used to retrieves a lot of different information). **Additional context** We can use an initial[ table of contents ](https://stackoverflow.com/questions/21151450/how-can-i-add-a-table-of-contents-to-a-jupyter-jupyterlab-notebook) for a better navigation over the notebook. So, each example can be directly referred by an internal link.
Author
Owner

@stephanebruckert commented on GitHub (Jan 25, 2023):

@mase-git great idea, would you like to open a PR for it?

<!-- gh-comment-id:1404035957 --> @stephanebruckert commented on GitHub (Jan 25, 2023): @mase-git great idea, would you like to open a PR for it?
Author
Owner

@mase-git commented on GitHub (Jan 25, 2023):

Yep, I will do. I am working on it!

<!-- gh-comment-id:1404038696 --> @mase-git commented on GitHub (Jan 25, 2023): Yep, I will do. I am working on it!
Author
Owner

@stephanebruckert commented on GitHub (Jan 25, 2023):

I was thinking we could even have a separate repository for it in https://github.com/spotipy-dev, eg. spotipy-examples
It would contain the current examples as well as notebooks. Let me know if you think that would be cleaner.

<!-- gh-comment-id:1404039514 --> @stephanebruckert commented on GitHub (Jan 25, 2023): I was thinking we could even have a separate repository for it in https://github.com/spotipy-dev, eg. spotipy-examples It would contain the current examples as well as notebooks. Let me know if you think that would be cleaner.
Author
Owner

@mase-git commented on GitHub (Jan 25, 2023):

Yes, I agree. It is much better to do it in a separate repository.

<!-- gh-comment-id:1404041747 --> @mase-git commented on GitHub (Jan 25, 2023): Yes, I agree. It is much better to do it in a separate repository.
Author
Owner

@stephanebruckert commented on GitHub (Jan 25, 2023):

Just created and made you a maintainer of https://github.com/spotipy-dev/spotipy-examples

It will be useful particularly when cleaning up the current repo prior the v3

<!-- gh-comment-id:1404053352 --> @stephanebruckert commented on GitHub (Jan 25, 2023): Just created and made you a maintainer of https://github.com/spotipy-dev/spotipy-examples It will be useful particularly when cleaning up the current repo prior the [v3](https://github.com/spotipy-dev/spotipy/issues/652)
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#560
No description provided.