spotify-utils


Namespotify-utils JSON
Version 1.0.5 PyPI version JSON
download
home_pagehttps://gitlab.com/sustineo/spotify-utils
SummaryAn awesome and easy-to-use CLI for various Spotify® utility tasks
upload_time2023-10-25 20:20:52
maintainer
docs_urlNone
authorFabian Eulitz
requires_python>=3.8,<4.0
licenseGPL-3.0-only
keywords spotify cli utilities
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div id="top"></div>
<!-- PROJECT SHIELDS -->

![PyPI](https://img.shields.io/pypi/v/spotify-utils?style=for-the-badge)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/spotify-utils?style=for-the-badge)
![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline-status/sustineo/spotify-utils?style=for-the-badge)
![GitLab issues](https://img.shields.io/gitlab/issues/open/sustineo/spotify-utils?style=for-the-badge)
![GitLab merge requests](https://img.shields.io/gitlab/merge-requests/open-raw/sustineo/spotify-utils?style=for-the-badge)
![GitLab](https://img.shields.io/gitlab/license/sustineo/spotify-utils?style=for-the-badge)

<!-- PROJECT LOGO -->
<br />
<div align="center">
  <a href="https://gitlab.com/sustineo/spotify-utils">
    <img src="https://gitlab.com/sustineo/spotify-utils/-/raw/main/docs/assets/media_player.svg" alt="Logo" width="200" height="200">
  </a>

  <h2 align="center">spotify-utils</h2>

  <p align="center">
    An awesome and easy-to-use CLI for various Spotify&reg; utility tasks!
    <br />
    <a href=https://gitlab.com/sustineo/spotify-utils/-/issues">Report Bug</a>
    ·
    <a href="https://gitlab.com/sustineo/spotify-utils/-/issues">Request Feature</a>
  </p>
</div>

<!-- TABLE OF CONTENTS -->
<details>
  <summary>Table of Contents</summary>
  <ol>
    <li>
      <a href="#about-the-project">About The Project</a>
      <ul>
        <li><a href="#built-with">Built With</a></li>
      </ul>
    </li>
    <li>
      <a href="#getting-started">Getting Started</a>
      <ul>
        <li><a href="#prerequisites">Prerequisites</a></li>
        <li><a href="#installation">Installation</a></li>
      </ul>
    </li>
    <li><a href="#usage">Usage</a></li>
    <li><a href="#roadmap">Roadmap</a></li>
    <li><a href="#contributing">Contributing</a></li>
    <li><a href="#license">License</a></li>
    <li><a href="#contact">Contact</a></li>
    <li><a href="#acknowledgments">Acknowledgments</a></li>
    <li><a href="#disclaimer">Disclaimer</a></li>
  </ol>
</details>

<!-- ABOUT THE PROJECT -->

## About The Project

There are many Spotify&reg; clients out there; however, I didn't find one that really suited my needs so I created this one. I want to create a Spotify&reg; CLI which is easy-to-use, packed with useful functionalities and with a sophisticated documentation built-in.

Key features:

- Playlists
  - List information about playlists of the authenticated user in various output formats (Console, JSON)
  - Find duplicate tracks across all playlists
  - Export playlist information in various formats (JSON, HTML template)
- More coming soon

Of course, this CLI will not serve all needs, especially during development. So I'll be adding more features in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue. Thanks to all the people have contributed!

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- GETTING STARTED -->

## Getting Started

### Prerequisites

- Python 3.8 or higher

### Installation

```bash
pip install spotify-utils
```

### Configuration

All methods require user authorization. You will need to register your app at [My Dashboard](https://developer.spotify.com/dashboard/applications) to get the credentials necessary to make authorized calls (a client id and client secret). [Click here](https://developer.spotify.com/documentation/general/guides/authorization/app-settings/) to go to the step-by-step guide for creating a Spotify&reg; application.

The CLI uses the Authorization Code flow, which the user logs into once. It provides an access token that can be refreshed.

Environment variables are being used for configuration. In order for the CLI to function properly you need to provide the following environment variables (use export instead of SET on Linux):

```powershell
set SPOTIFY_UTILS_CLIENT_ID='your-spotify-client-id'
set SPOTIFY_UTILS_CLIENT_SECRET='your-spotify-client-secret'
set SPOTIFY_UTILS_REDIRECT_URI='your-app-redirect-url'
```

In addition the use of an `.env` file is supported:

```
SPOTIFY_UTILS_CLIENT_ID='your-spotify-client-id'
SPOTIFY_UTILS_CLIENT_SECRET='your-spotify-client-secret'
SPOTIFY_UTILS_REDIRECT_URI='your-app-redirect-url'
```

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- USAGE EXAMPLES -->

## Usage and examples

In this section you can find usage examples of the CLI

### List all playlists of the current authenticated user in JSON format

```text
spotify-utils playlists list --json
```

```json
[
   {
      "collaborative":false,
      "description":"Car Music Mix 2022 \ud83d\udd25 Best Remixes of Popular Songs 2022 EDM, Bass Boosted  by Rise Music",
      "external_urls":{
         "spotify":"https://open.spotify.com/playlist/0fM4AkfoGygOHVXjsNB7io"
      },
      ... more
   }
]
```

### Find duplicates across all playlists and display additional details:

```text
spotify-utils playlists duplicates --verbose
```

Found 43 duplicate tracks across 20 playlists
| | name | artists | playlists | track_id |
|---|----------------|-------------------------|------------------------|------------------------|
| 0 | Piercing Light | League of Legends, Mako | Rock, Sonos Mainstream | 0163ud7I4Vb0ID5K7WBkq9 |
| 1 |Edge Of The Earth | Thirty Seconds To Mars| Rock, Pop|0g9IOJwdElaCZEvcqGRP4b |
| ... |... |... |... |... |

### Export playlist as beautiful HTML file

```text
spotify-utils playlists export --html
```

![HTML export](https://gitlab.com/sustineo/spotify-utils/-/raw/main/docs/assets/examples/html_export.png)

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- ROADMAP -->

## Roadmap

- [ ] Improve help sections of the CLI
- [ ] Add additional functionality

See the [open issues](https://gitlab.com/sustineo/spotify-utils/-/issues) for a full list of proposed features (and known issues).

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- CONTRIBUTING -->

## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- LICENSE -->

## License

Distributed under the GPL-3.0 License. See [LICENSE](LICENSE) for more information.

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- CONTACT -->

## Contact

Fabian Eulitz - [@sustineo\_](https://twitter.com/sustineo_) - dev@sustineo.de

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- ACKNOWLEDGMENTS -->

## Acknowledgments

- [Typer](https://github.com/tiangolo/typer)
- [Spotipy](https://github.com/plamere/spotipy)
- [Vermin](https://github.com/netromdk/vermin)
- [Shields.io](https://shields.io)
- [Choose an Open Source License](https://choosealicense.com)

<p align="right">(<a href="#top">back to top</a>)</p>

## Disclaimer

This project isn’t endorsed by Spotify AB and doesn’t reflect the views or opinions of Spotify AB or anyone officially involved in producing or managing Spotify&reg;

<p align="right">(<a href="#top">back to top</a>)</p>

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/sustineo/spotify-utils",
    "name": "spotify-utils",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "spotify,CLI,utilities",
    "author": "Fabian Eulitz",
    "author_email": "dev@sustineo.de",
    "download_url": "https://files.pythonhosted.org/packages/b3/a9/0c248c5898c39bb5aff2d22dd94158e12cc939a316477804608c86b1b730/spotify_utils-1.0.5.tar.gz",
    "platform": null,
    "description": "<div id=\"top\"></div>\n<!-- PROJECT SHIELDS -->\n\n![PyPI](https://img.shields.io/pypi/v/spotify-utils?style=for-the-badge)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/spotify-utils?style=for-the-badge)\n![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline-status/sustineo/spotify-utils?style=for-the-badge)\n![GitLab issues](https://img.shields.io/gitlab/issues/open/sustineo/spotify-utils?style=for-the-badge)\n![GitLab merge requests](https://img.shields.io/gitlab/merge-requests/open-raw/sustineo/spotify-utils?style=for-the-badge)\n![GitLab](https://img.shields.io/gitlab/license/sustineo/spotify-utils?style=for-the-badge)\n\n<!-- PROJECT LOGO -->\n<br />\n<div align=\"center\">\n  <a href=\"https://gitlab.com/sustineo/spotify-utils\">\n    <img src=\"https://gitlab.com/sustineo/spotify-utils/-/raw/main/docs/assets/media_player.svg\" alt=\"Logo\" width=\"200\" height=\"200\">\n  </a>\n\n  <h2 align=\"center\">spotify-utils</h2>\n\n  <p align=\"center\">\n    An awesome and easy-to-use CLI for various Spotify&reg; utility tasks!\n    <br />\n    <a href=https://gitlab.com/sustineo/spotify-utils/-/issues\">Report Bug</a>\n    \u00b7\n    <a href=\"https://gitlab.com/sustineo/spotify-utils/-/issues\">Request Feature</a>\n  </p>\n</div>\n\n<!-- TABLE OF CONTENTS -->\n<details>\n  <summary>Table of Contents</summary>\n  <ol>\n    <li>\n      <a href=\"#about-the-project\">About The Project</a>\n      <ul>\n        <li><a href=\"#built-with\">Built With</a></li>\n      </ul>\n    </li>\n    <li>\n      <a href=\"#getting-started\">Getting Started</a>\n      <ul>\n        <li><a href=\"#prerequisites\">Prerequisites</a></li>\n        <li><a href=\"#installation\">Installation</a></li>\n      </ul>\n    </li>\n    <li><a href=\"#usage\">Usage</a></li>\n    <li><a href=\"#roadmap\">Roadmap</a></li>\n    <li><a href=\"#contributing\">Contributing</a></li>\n    <li><a href=\"#license\">License</a></li>\n    <li><a href=\"#contact\">Contact</a></li>\n    <li><a href=\"#acknowledgments\">Acknowledgments</a></li>\n    <li><a href=\"#disclaimer\">Disclaimer</a></li>\n  </ol>\n</details>\n\n<!-- ABOUT THE PROJECT -->\n\n## About The Project\n\nThere are many Spotify&reg; clients out there; however, I didn't find one that really suited my needs so I created this one. I want to create a Spotify&reg; CLI which is easy-to-use, packed with useful functionalities and with a sophisticated documentation built-in.\n\nKey features:\n\n- Playlists\n  - List information about playlists of the authenticated user in various output formats (Console, JSON)\n  - Find duplicate tracks across all playlists\n  - Export playlist information in various formats (JSON, HTML template)\n- More coming soon\n\nOf course, this CLI will not serve all needs, especially during development. So I'll be adding more features in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue. Thanks to all the people have contributed!\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- GETTING STARTED -->\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.8 or higher\n\n### Installation\n\n```bash\npip install spotify-utils\n```\n\n### Configuration\n\nAll methods require user authorization. You will need to register your app at [My Dashboard](https://developer.spotify.com/dashboard/applications) to get the credentials necessary to make authorized calls (a client id and client secret). [Click here](https://developer.spotify.com/documentation/general/guides/authorization/app-settings/) to go to the step-by-step guide for creating a Spotify&reg; application.\n\nThe CLI uses the Authorization Code flow, which the user logs into once. It provides an access token that can be refreshed.\n\nEnvironment variables are being used for configuration. In order for the CLI to function properly you need to provide the following environment variables (use export instead of SET on Linux):\n\n```powershell\nset SPOTIFY_UTILS_CLIENT_ID='your-spotify-client-id'\nset SPOTIFY_UTILS_CLIENT_SECRET='your-spotify-client-secret'\nset SPOTIFY_UTILS_REDIRECT_URI='your-app-redirect-url'\n```\n\nIn addition the use of an `.env` file is supported:\n\n```\nSPOTIFY_UTILS_CLIENT_ID='your-spotify-client-id'\nSPOTIFY_UTILS_CLIENT_SECRET='your-spotify-client-secret'\nSPOTIFY_UTILS_REDIRECT_URI='your-app-redirect-url'\n```\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- USAGE EXAMPLES -->\n\n## Usage and examples\n\nIn this section you can find usage examples of the CLI\n\n### List all playlists of the current authenticated user in JSON format\n\n```text\nspotify-utils playlists list --json\n```\n\n```json\n[\n   {\n      \"collaborative\":false,\n      \"description\":\"Car Music Mix 2022 \\ud83d\\udd25 Best Remixes of Popular Songs 2022 EDM, Bass Boosted  by Rise Music\",\n      \"external_urls\":{\n         \"spotify\":\"https://open.spotify.com/playlist/0fM4AkfoGygOHVXjsNB7io\"\n      },\n      ... more\n   }\n]\n```\n\n### Find duplicates across all playlists and display additional details:\n\n```text\nspotify-utils playlists duplicates --verbose\n```\n\nFound 43 duplicate tracks across 20 playlists\n| | name | artists | playlists | track_id |\n|---|----------------|-------------------------|------------------------|------------------------|\n| 0 | Piercing Light | League of Legends, Mako | Rock, Sonos Mainstream | 0163ud7I4Vb0ID5K7WBkq9 |\n| 1 |Edge Of The Earth | Thirty Seconds To Mars| Rock, Pop|0g9IOJwdElaCZEvcqGRP4b |\n| ... |... |... |... |... |\n\n### Export playlist as beautiful HTML file\n\n```text\nspotify-utils playlists export --html\n```\n\n![HTML export](https://gitlab.com/sustineo/spotify-utils/-/raw/main/docs/assets/examples/html_export.png)\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- ROADMAP -->\n\n## Roadmap\n\n- [ ] Improve help sections of the CLI\n- [ ] Add additional functionality\n\nSee the [open issues](https://gitlab.com/sustineo/spotify-utils/-/issues) for a full list of proposed features (and known issues).\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- CONTRIBUTING -->\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- LICENSE -->\n\n## License\n\nDistributed under the GPL-3.0 License. See [LICENSE](LICENSE) for more information.\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- CONTACT -->\n\n## Contact\n\nFabian Eulitz - [@sustineo\\_](https://twitter.com/sustineo_) - dev@sustineo.de\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- ACKNOWLEDGMENTS -->\n\n## Acknowledgments\n\n- [Typer](https://github.com/tiangolo/typer)\n- [Spotipy](https://github.com/plamere/spotipy)\n- [Vermin](https://github.com/netromdk/vermin)\n- [Shields.io](https://shields.io)\n- [Choose an Open Source License](https://choosealicense.com)\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n## Disclaimer\n\nThis project isn\u2019t endorsed by Spotify AB and doesn\u2019t reflect the views or opinions of Spotify AB or anyone officially involved in producing or managing Spotify&reg;\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "An awesome and easy-to-use CLI for various Spotify\u00ae utility tasks",
    "version": "1.0.5",
    "project_urls": {
        "Homepage": "https://gitlab.com/sustineo/spotify-utils",
        "Repository": "https://gitlab.com/sustineo/spotify-utils"
    },
    "split_keywords": [
        "spotify",
        "cli",
        "utilities"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "98c240ab6e1c4a7fe34f2ae163f357a9f69fd0f9f0fa9f267e7ad9e639defa8c",
                "md5": "42ae72229769a6ced0dbf13e394b5fc3",
                "sha256": "caf97fc4f18c89b58961d3661ee37f2a31b1360a3c1f9bcaa9a70c52ae5f17f1"
            },
            "downloads": -1,
            "filename": "spotify_utils-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "42ae72229769a6ced0dbf13e394b5fc3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 23479,
            "upload_time": "2023-10-25T20:20:51",
            "upload_time_iso_8601": "2023-10-25T20:20:51.064270Z",
            "url": "https://files.pythonhosted.org/packages/98/c2/40ab6e1c4a7fe34f2ae163f357a9f69fd0f9f0fa9f267e7ad9e639defa8c/spotify_utils-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b3a90c248c5898c39bb5aff2d22dd94158e12cc939a316477804608c86b1b730",
                "md5": "654050410e41d01c53fa882f4d6a2e31",
                "sha256": "887bd53a8963480fdcb68e910bada895e3f0eb8bb1d84f2e8480a02f5d7890c7"
            },
            "downloads": -1,
            "filename": "spotify_utils-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "654050410e41d01c53fa882f4d6a2e31",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 23547,
            "upload_time": "2023-10-25T20:20:52",
            "upload_time_iso_8601": "2023-10-25T20:20:52.615114Z",
            "url": "https://files.pythonhosted.org/packages/b3/a9/0c248c5898c39bb5aff2d22dd94158e12cc939a316477804608c86b1b730/spotify_utils-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-25 20:20:52",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "sustineo",
    "gitlab_project": "spotify-utils",
    "lcname": "spotify-utils"
}
        
Elapsed time: 0.15542s