geniusdotpy


Namegeniusdotpy JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/jjoeldaniel/genius.py
SummaryPython wrapper for Genius API
upload_time2023-12-29 18:51:23
maintainer
docs_urlNone
authorjjoeldaniel
requires_python
license
keywords python genius api-wrapper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # **genius.py**

[![PyPI version](https://img.shields.io/pypi/v/geniusdotpy)](https://pypi.org/project/geniusdotpy/)
[![Python 3.x version](https://img.shields.io/badge/python-3.x-brightgreen.svg)](https://www.python.org/downloads/)
[![Documentation](https://img.shields.io/badge/documentation-8A2BE2)](https://jjoeldaniel.github.io/genius.py/)
[![Downloads](https://static.pepy.tech/badge/geniusdotpy)](https://pepy.tech/project/geniusdotpy)

> Python wrapper for Genius API

With genius.py, enjoy an easy-to-use interface to interact with [Genius API](https://docs.genius.com)

## Table of Contents

- [Table of Contents](#table-of-contents)
- [Features](#features)
- [Install](#install)
- [Getting Started](#getting-started)
- [References](#references)

---

## Features

- Feature rich interface
- Easy to use
- Lyrics web scraper

## Install

```bash
pip install geniusdotpy
```

## Getting Started

To get started...

1. Get your Client Access Token [here](https://genius.com/api-clients)

2. Create a new *Genius* object

    ```python
    from geniusdotpy.genius import Genius

    # Get your client access token from https://genius.com/api-clients
    client_access_token = "token"

    # Create a GeniusBuilder object
    genius = Genius(client_access_token=client_access_token)

    # Search for a track by ID
    track1 = genius.search_track_by_id(378195)
    print(repr(track1))

    # Search artist by ID
    artist1 = genius.search_artist(track1.artist.id)
    print(repr(artist1))

    # Search for a track by query
    track3 = genius.search("Beat It")[0]
    print(repr(track3))

    # Search tracks by artist
    tracks: list[Track] = genius.search_track_by_artist(artist_id=16775)
    track4 = tracks[0]
    print(repr(track4))

    # Retrieve lyrics
    track4.get_lyrics()
    print(track4.lyrics)
    ```

3. ???

4. Profit

## References

[Genius API](https://docs.genius.com)

---

Created with 💖 by [*jjoeldaniel*](https://github.com/jjoeldaniel)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jjoeldaniel/genius.py",
    "name": "geniusdotpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,genius,api-wrapper",
    "author": "jjoeldaniel",
    "author_email": "<joeldanielrico@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a3/ec/4a9dbd5bedb6a1a527fb0360dd501a1e00abf6433391c2ecaa64f452c18c/geniusdotpy-1.1.1.tar.gz",
    "platform": null,
    "description": "# **genius.py**\n\n[![PyPI version](https://img.shields.io/pypi/v/geniusdotpy)](https://pypi.org/project/geniusdotpy/)\n[![Python 3.x version](https://img.shields.io/badge/python-3.x-brightgreen.svg)](https://www.python.org/downloads/)\n[![Documentation](https://img.shields.io/badge/documentation-8A2BE2)](https://jjoeldaniel.github.io/genius.py/)\n[![Downloads](https://static.pepy.tech/badge/geniusdotpy)](https://pepy.tech/project/geniusdotpy)\n\n> Python wrapper for Genius API\n\nWith genius.py, enjoy an easy-to-use interface to interact with [Genius API](https://docs.genius.com)\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Features](#features)\n- [Install](#install)\n- [Getting Started](#getting-started)\n- [References](#references)\n\n---\n\n## Features\n\n- Feature rich interface\n- Easy to use\n- Lyrics web scraper\n\n## Install\n\n```bash\npip install geniusdotpy\n```\n\n## Getting Started\n\nTo get started...\n\n1. Get your Client Access Token [here](https://genius.com/api-clients)\n\n2. Create a new *Genius* object\n\n    ```python\n    from geniusdotpy.genius import Genius\n\n    # Get your client access token from https://genius.com/api-clients\n    client_access_token = \"token\"\n\n    # Create a GeniusBuilder object\n    genius = Genius(client_access_token=client_access_token)\n\n    # Search for a track by ID\n    track1 = genius.search_track_by_id(378195)\n    print(repr(track1))\n\n    # Search artist by ID\n    artist1 = genius.search_artist(track1.artist.id)\n    print(repr(artist1))\n\n    # Search for a track by query\n    track3 = genius.search(\"Beat It\")[0]\n    print(repr(track3))\n\n    # Search tracks by artist\n    tracks: list[Track] = genius.search_track_by_artist(artist_id=16775)\n    track4 = tracks[0]\n    print(repr(track4))\n\n    # Retrieve lyrics\n    track4.get_lyrics()\n    print(track4.lyrics)\n    ```\n\n3. ???\n\n4. Profit\n\n## References\n\n[Genius API](https://docs.genius.com)\n\n---\n\nCreated with \ud83d\udc96 by [*jjoeldaniel*](https://github.com/jjoeldaniel)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python wrapper for Genius API",
    "version": "1.1.1",
    "project_urls": {
        "Homepage": "https://github.com/jjoeldaniel/genius.py"
    },
    "split_keywords": [
        "python",
        "genius",
        "api-wrapper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0e3bcd7dbc8a4c3a0a5fc4be2fd6a2d831d4061af5db4d04420a3b0bb63b8b51",
                "md5": "61513893d7a56571083a061f8f34c5a6",
                "sha256": "ef20ecffc414c275e7db8f8ab7c217e98f696ef662b92d619b38664bf1142e73"
            },
            "downloads": -1,
            "filename": "geniusdotpy-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "61513893d7a56571083a061f8f34c5a6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6488,
            "upload_time": "2023-12-29T18:51:21",
            "upload_time_iso_8601": "2023-12-29T18:51:21.678102Z",
            "url": "https://files.pythonhosted.org/packages/0e/3b/cd7dbc8a4c3a0a5fc4be2fd6a2d831d4061af5db4d04420a3b0bb63b8b51/geniusdotpy-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a3ec4a9dbd5bedb6a1a527fb0360dd501a1e00abf6433391c2ecaa64f452c18c",
                "md5": "d055f1b1e2cc4763491a7a699b50c08e",
                "sha256": "2c339e550bd0f519f25fe1fd264540d6d1165665db6ba83186e40856b0fa44ff"
            },
            "downloads": -1,
            "filename": "geniusdotpy-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d055f1b1e2cc4763491a7a699b50c08e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5063,
            "upload_time": "2023-12-29T18:51:23",
            "upload_time_iso_8601": "2023-12-29T18:51:23.157312Z",
            "url": "https://files.pythonhosted.org/packages/a3/ec/4a9dbd5bedb6a1a527fb0360dd501a1e00abf6433391c2ecaa64f452c18c/geniusdotpy-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-29 18:51:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jjoeldaniel",
    "github_project": "genius.py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "geniusdotpy"
}
        
Elapsed time: 0.24794s