song-metadata-client


Namesong-metadata-client JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/Billuc/song-metadata-client
SummaryA generic client to fetch metadata for any song
upload_time2023-06-22 20:38:43
maintainer
docs_urlNone
authorBilluc
requires_python>=3.9,<4.0
licenseMIT
keywords metadata python song metadata spotify youtube youtube music music song
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Song Metadata Client

**Get metadata about your favorite songs and playlists !**

## Features

 - Automatic metadata fetching from different services
   - Currently supported : Spotify, Youtube Music
 - Metadata fetching from an URL or a query
 - Supports playlist URLs
 - Easy to use, straightforward interface
 - Possible to use via DI integration

## Installation

### Pip

```
pip install song-metadata-client
```

### Poetry

[Poetry](https://python-poetry.org/) is a Python dependency management and packaging tool. I actually use it for this project.

```
poetry add song-metadata-client
```

## Usage

There are 2 ways to use this library : using the SongMetadataClient object or via the DI.

### Using SongMetadataClient

The library exposes the SongMetadata class. This class has 1 methods : `search`.

This method fetches the metadata corresponding to the request you give it, whether it is an URL or a query. It returns the result as a `SongMetadata` object or a `PlaylistMetadata` object.

**Example :**

```python
from song_metadata_client import SongMetadataClient

client = SongMetadataClient()
result = client.search("in the end - linkin park")

title = result.title # In The End
```

### Using DI

The library also exposes a `BaseMetadataClient` interface and a `add_song_metadata_client` function for [Taipan-DI](https://github.com/Billuc/Taipan-DI).

In this function, the clients are registered as a Pipeline. All you need to do is to resolve the pipeline and execute it.

**Example :**

```python
from song_metadata_client import BaseMetadataClient, add_song_metadata_client
from taipan_di import DependencyCollection

services = DependencyCollection()
add_song_metadata_client(services)

provider = services.build()
client = provider.resolve(BaseMetadataClient)

result = client.exec("in the end - linkin park")
title = result.title # In The End
```

## Inspirations

This library is partially based on spotDL's [spotify-downloader](https://github.com/spotDL/spotify-downloader).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Billuc/song-metadata-client",
    "name": "song-metadata-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "metadata,python,song metadata,spotify,youtube,youtube music,music,song",
    "author": "Billuc",
    "author_email": "billuc@hotmail.fr",
    "download_url": "https://files.pythonhosted.org/packages/60/7c/bb34fbeb814bba5c7b074b7a7ec1a3ce8c6888d614b1364906f330ae8460/song_metadata_client-0.0.2.tar.gz",
    "platform": null,
    "description": "# Song Metadata Client\n\n**Get metadata about your favorite songs and playlists !**\n\n## Features\n\n - Automatic metadata fetching from different services\n   - Currently supported : Spotify, Youtube Music\n - Metadata fetching from an URL or a query\n - Supports playlist URLs\n - Easy to use, straightforward interface\n - Possible to use via DI integration\n\n## Installation\n\n### Pip\n\n```\npip install song-metadata-client\n```\n\n### Poetry\n\n[Poetry](https://python-poetry.org/) is a Python dependency management and packaging tool. I actually use it for this project.\n\n```\npoetry add song-metadata-client\n```\n\n## Usage\n\nThere are 2 ways to use this library : using the SongMetadataClient object or via the DI.\n\n### Using SongMetadataClient\n\nThe library exposes the SongMetadata class. This class has 1 methods : `search`.\n\nThis method fetches the metadata corresponding to the request you give it, whether it is an URL or a query. It returns the result as a `SongMetadata` object or a `PlaylistMetadata` object.\n\n**Example :**\n\n```python\nfrom song_metadata_client import SongMetadataClient\n\nclient = SongMetadataClient()\nresult = client.search(\"in the end - linkin park\")\n\ntitle = result.title # In The End\n```\n\n### Using DI\n\nThe library also exposes a `BaseMetadataClient` interface and a `add_song_metadata_client` function for [Taipan-DI](https://github.com/Billuc/Taipan-DI).\n\nIn this function, the clients are registered as a Pipeline. All you need to do is to resolve the pipeline and execute it.\n\n**Example :**\n\n```python\nfrom song_metadata_client import BaseMetadataClient, add_song_metadata_client\nfrom taipan_di import DependencyCollection\n\nservices = DependencyCollection()\nadd_song_metadata_client(services)\n\nprovider = services.build()\nclient = provider.resolve(BaseMetadataClient)\n\nresult = client.exec(\"in the end - linkin park\")\ntitle = result.title # In The End\n```\n\n## Inspirations\n\nThis library is partially based on spotDL's [spotify-downloader](https://github.com/spotDL/spotify-downloader).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A generic client to fetch metadata for any song",
    "version": "0.0.2",
    "project_urls": {
        "Documentation": "https://github.com/Billuc/song-metadata-client",
        "Homepage": "https://github.com/Billuc/song-metadata-client",
        "Repository": "https://github.com/Billuc/song-metadata-client"
    },
    "split_keywords": [
        "metadata",
        "python",
        "song metadata",
        "spotify",
        "youtube",
        "youtube music",
        "music",
        "song"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f222330f5d6ee88a686090dff487bafa5456b4fe0afd053a45f5eb7a03f723a",
                "md5": "c7bdebc713ec92254124da6c141f9072",
                "sha256": "bb88f2931b5f1fd8ed1c39ebdeed322553d9e045ce9ba84095516ff6300f5f0b"
            },
            "downloads": -1,
            "filename": "song_metadata_client-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c7bdebc713ec92254124da6c141f9072",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 15150,
            "upload_time": "2023-06-22T20:38:41",
            "upload_time_iso_8601": "2023-06-22T20:38:41.850989Z",
            "url": "https://files.pythonhosted.org/packages/0f/22/2330f5d6ee88a686090dff487bafa5456b4fe0afd053a45f5eb7a03f723a/song_metadata_client-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "607cbb34fbeb814bba5c7b074b7a7ec1a3ce8c6888d614b1364906f330ae8460",
                "md5": "a1da9898df0de50b8418c290c2bc05fc",
                "sha256": "5e5438d3c58f4165ee95b5dae6f28a473ba97c2323a1ad914087453f6b7ab424"
            },
            "downloads": -1,
            "filename": "song_metadata_client-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "a1da9898df0de50b8418c290c2bc05fc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 7857,
            "upload_time": "2023-06-22T20:38:43",
            "upload_time_iso_8601": "2023-06-22T20:38:43.455438Z",
            "url": "https://files.pythonhosted.org/packages/60/7c/bb34fbeb814bba5c7b074b7a7ec1a3ce8c6888d614b1364906f330ae8460/song_metadata_client-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-22 20:38:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Billuc",
    "github_project": "song-metadata-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "song-metadata-client"
}
        
Elapsed time: 0.10065s