Mumee


NameMumee JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/Billuc/Mumee
SummaryMUsic MEtadata Explorer
upload_time2023-08-28 07:47:21
maintainer
docs_urlNone
authorBilluc
requires_python>=3.9,<4.0
licenseMIT
keywords mumee 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.
            # Mumee

**Get metadata about your favorite songs and playlists !**  
Mumee stands for *MUsic MEtadata Explorer*

## 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 mumee
```

### Poetry

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

```
poetry add mumee
```

## Usage

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

### Using SongMetadataClient

The library exposes the `SongMetadataClient` class. This class has 2 methods : `fetch` and `search`.

The `fetch` 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 mumee import SongMetadataClient

client = SongMetadataClient()
result = client.fetch("https://open.spotify.com/track/7AB0cUXnzuSlAnyHOqmrZr")

title = result.title # Faint
artists = result.artists # ['Linkin Park']
```

The `search` method expects a query (e.g.: {title} - {artists}) and a limit corresponding to the number of results you want. It returns a list of `SongMetadata` objects that fit closest to the query that was given. This list is sorted by closest fit per client.

**Example :**

```python
from mumee import SongMetadataClient

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

title = results[0].title # In The End
artists = results[0].artists # ['Linkin Park']
```

### Using DI

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

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

**Example 1 :**

```python
from mumee import BaseMetadataClient, add_mumee
from taipan_di import DependencyCollection

services = DependencyCollection()
add_mumee(services)

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

result = client.exec("https://open.spotify.com/track/7AB0cUXnzuSlAnyHOqmrZr")
title = result.title # Faint
```

**Example 2 :**

```python
from mumee import BaseMetadataExplorer, add_mumee
from taipan_di import DependencyCollection

services = DependencyCollection()
add_mumee(services)

provider = services.build()
explorer = provider.resolve(BaseMetadataExplorer)

command = SearchMetadataCommand("in the end - linkin park")
results = explorer.exec(command)
title = results[0].title # In The End
```

## Inspirations

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

## TODO

This library isn't stable yet and a lot of things can still be improved.
If there is something you want to see added or if something does not work as you want it to, feel free to open an issue.

Here is a list of features I have in mind and will be working on :

- Support for Amazon Music
- More metadata in the SongMetadata class
- Re-sort explorer results

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Billuc/Mumee",
    "name": "Mumee",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "mumee,metadata,python,song metadata,spotify,youtube,youtube music,music,song",
    "author": "Billuc",
    "author_email": "billuc@hotmail.fr",
    "download_url": "https://files.pythonhosted.org/packages/49/ac/7510973fb261fb0f06627784aa05d4479d2bd9f16366ca5a9a554d3a9b61/mumee-0.0.7.tar.gz",
    "platform": null,
    "description": "# Mumee\n\n**Get metadata about your favorite songs and playlists !**  \nMumee stands for *MUsic MEtadata Explorer*\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 mumee\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 mumee\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 `SongMetadataClient` class. This class has 2 methods : `fetch` and `search`.\n\nThe `fetch` 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 mumee import SongMetadataClient\n\nclient = SongMetadataClient()\nresult = client.fetch(\"https://open.spotify.com/track/7AB0cUXnzuSlAnyHOqmrZr\")\n\ntitle = result.title # Faint\nartists = result.artists # ['Linkin Park']\n```\n\nThe `search` method expects a query (e.g.: {title} - {artists}) and a limit corresponding to the number of results you want. It returns a list of `SongMetadata` objects that fit closest to the query that was given. This list is sorted by closest fit per client.\n\n**Example :**\n\n```python\nfrom mumee import SongMetadataClient\n\nclient = SongMetadataClient()\nresults = client.search(\"in the end - linkin park\")\n\ntitle = results[0].title # In The End\nartists = results[0].artists # ['Linkin Park']\n```\n\n### Using DI\n\nThe library also exposes the `BaseMetadataClient` and `BaseMetadataExplorer` interfaces and a `add_mumee` function for [Taipan-DI](https://github.com/Billuc/Taipan-DI).\n\nIn this function, the clients and explorers are registered as a Pipeline. All you need to do is to resolve the pipelines and execute it.\n\n**Example 1 :**\n\n```python\nfrom mumee import BaseMetadataClient, add_mumee\nfrom taipan_di import DependencyCollection\n\nservices = DependencyCollection()\nadd_mumee(services)\n\nprovider = services.build()\nclient = provider.resolve(BaseMetadataClient)\n\nresult = client.exec(\"https://open.spotify.com/track/7AB0cUXnzuSlAnyHOqmrZr\")\ntitle = result.title # Faint\n```\n\n**Example 2 :**\n\n```python\nfrom mumee import BaseMetadataExplorer, add_mumee\nfrom taipan_di import DependencyCollection\n\nservices = DependencyCollection()\nadd_mumee(services)\n\nprovider = services.build()\nexplorer = provider.resolve(BaseMetadataExplorer)\n\ncommand = SearchMetadataCommand(\"in the end - linkin park\")\nresults = explorer.exec(command)\ntitle = results[0].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\n## TODO\n\nThis library isn't stable yet and a lot of things can still be improved.\nIf there is something you want to see added or if something does not work as you want it to, feel free to open an issue.\n\nHere is a list of features I have in mind and will be working on :\n\n- Support for Amazon Music\n- More metadata in the SongMetadata class\n- Re-sort explorer results\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "MUsic MEtadata Explorer",
    "version": "0.0.7",
    "project_urls": {
        "Documentation": "https://github.com/Billuc/Mumee",
        "Homepage": "https://github.com/Billuc/Mumee",
        "Repository": "https://github.com/Billuc/Mumee"
    },
    "split_keywords": [
        "mumee",
        "metadata",
        "python",
        "song metadata",
        "spotify",
        "youtube",
        "youtube music",
        "music",
        "song"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "00d6f0c844de483633308623bf34995b8403f75b16a869f83d45a9f83d0c0a3b",
                "md5": "6f5b7ba28d2e629627cf74ed6521ce63",
                "sha256": "fdf08010beec6eb368aed45b5b28dafc24f9ae26aca8793adc853a0a6a6c00ac"
            },
            "downloads": -1,
            "filename": "mumee-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f5b7ba28d2e629627cf74ed6521ce63",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 18797,
            "upload_time": "2023-08-28T07:47:20",
            "upload_time_iso_8601": "2023-08-28T07:47:20.735242Z",
            "url": "https://files.pythonhosted.org/packages/00/d6/f0c844de483633308623bf34995b8403f75b16a869f83d45a9f83d0c0a3b/mumee-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49ac7510973fb261fb0f06627784aa05d4479d2bd9f16366ca5a9a554d3a9b61",
                "md5": "ea5b23f654cfdf2d12bec5e87c310df2",
                "sha256": "64e4a5f0a74538904b7a216ea5d4875127fad37e54a2da8089f19900fa684e91"
            },
            "downloads": -1,
            "filename": "mumee-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "ea5b23f654cfdf2d12bec5e87c310df2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 9985,
            "upload_time": "2023-08-28T07:47:21",
            "upload_time_iso_8601": "2023-08-28T07:47:21.878317Z",
            "url": "https://files.pythonhosted.org/packages/49/ac/7510973fb261fb0f06627784aa05d4479d2bd9f16366ca5a9a554d3a9b61/mumee-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-28 07:47:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Billuc",
    "github_project": "Mumee",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mumee"
}
        
Elapsed time: 0.11092s