{"id":23317573,"url":"https://github.com/tefra/pydrag","last_synced_at":"2026-01-29T10:42:02.015Z","repository":{"id":33779781,"uuid":"156107551","full_name":"tefra/pydrag","owner":"tefra","description":"Fluent Last.fm API wrapper","archived":false,"fork":false,"pushed_at":"2022-05-08T09:31:04.000Z","size":811,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-08T02:20:10.563Z","etag":null,"topics":["last-fm","python","scrobbling"],"latest_commit_sha":null,"homepage":"https://pydrag.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tefra.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-04T17:33:33.000Z","updated_at":"2022-05-08T09:13:26.000Z","dependencies_parsed_at":"2022-07-28T20:59:43.326Z","dependency_job_id":null,"html_url":"https://github.com/tefra/pydrag","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tefra%2Fpydrag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tefra%2Fpydrag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tefra%2Fpydrag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tefra%2Fpydrag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tefra","download_url":"https://codeload.github.com/tefra/pydrag/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230615235,"owners_count":18253932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["last-fm","python","scrobbling"],"created_at":"2024-12-20T16:34:34.463Z","updated_at":"2026-01-29T10:41:56.994Z","avatar_url":"https://github.com/tefra.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pydrag\n======\n\n\n.. image:: https://github.com/tefra/pydrag/workflows/tests/badge.svg\n    :target: https://github.com/tefra/pydrag/actions\n\n.. image:: https://readthedocs.org/projects/pydrag/badge\n    :target: https://pydrag.readthedocs.io/\n\n.. image:: https://codecov.io/gh/tefra/pydrag/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/tefra/pydrag\n\n.. image:: https://img.shields.io/github/languages/top/tefra/pydrag.svg\n    :target: https://pydrag.readthedocs.io/\n\n.. image:: https://www.codefactor.io/repository/github/tefra/pydrag/badge\n   :target: https://www.codefactor.io/repository/github/tefra/pydrag\n\n.. image:: https://img.shields.io/pypi/pyversions/pydrag.svg\n    :target: https://pypi.org/pypi/pydrag/\n\n.. image:: https://img.shields.io/pypi/v/pydrag.svg\n    :target: https://pypi.org/pypi/pydrag/\n\n----\n\n\n**pydrag** is a modern api wrapper for the `Last.fm \u003chttps://www.last.fm/api/\u003e`_ api with a fluent syntax!\n\n\nQuick Start\n-----------\n\nApply for a last.fm `api key \u003chttps://www.last.fm/api/account/create\u003e`_ and write down your **key** and **secret**.\n\nInstall\n~~~~~~~\n\n.. code-block:: console\n\n    $ pip install pydrag\n\n\nExample\n~~~~~~~\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from pydrag import User, configure\n    \u003e\u003e\u003e configure(api_key='54062d8af7afdc_not_real_3459048a4')\n    \u003e\u003e\u003e rj = User.find(\"RJ\")\n    \u003e\u003e\u003e rj.real_name\n    'Richard Jones '\n    \u003e\u003e\u003e recent = rj.get_recent_tracks(limit=1, page=1)\n    \u003e\u003e\u003e first = recent.pop()\n    \u003e\u003e\u003e first.name\n    'Fu-Gee-La'\n    \u003e\u003e\u003e similar = first.get_similar(limit=1)\n    \u003e\u003e\u003e similar[0].name\n    'Family Business'\n    \u003e\u003e\u003e similar[0].artist.name\n    'Fugees'\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e for friend in rj.get_friends(recent_tracks=True):\n    ...     friend.name, friend.recent_track.name\n    ...\n    ('meichi', 'Pi')\n    ('demkod', '(bottle back)')\n    ('STBKilla', 'Nowhere Fast')\n    ('keret221', 'Letter Home')\n    ('Lilfix', 'Namorar pra Quê?')\n    ('Yoji', 'Empire State of Mind (feat. Alicia Keys)')\n    ('Kastishka', 'Wipe Your Eyes')\n    ('comingsoon_', 'I Want It All')\n    ('Bagheera', 'Welcome Home')\n\n\nDevelopment\n===========\n\nUse you favorite tool to create a python \u003e= 3.6 virtual environment\n\n.. code-block:: console\n\n   $ git clone git@github.com:tefra/pydrag.git\n   $ pip install .[dev]\n   $ pre-commit install\n   $ pytest\n   $ tox\n\npydrag uses `vcrpy \u003chttps://vcrpy.readthedocs.io/\u003e`_ library to record and replay\nlast.fm responses for its unit tests and\n`python-dotenv \u003chttps://pypi.org/project/python-dotenv/\u003e`_ to auto-configure itself.\n\nAll sensitive information like keys and credentials are automatically censored.\n\nSo when it's necessary to record a new response it's super useful to have a\n.env file with your configuration!\n\n.. code-block:: ini\n\n   LASTFM_API_KEY=your_api_key\n   LASTFM_API_SECRET=your_api_secret\n   LASTFM_USERNAME=You\n   LASTFM_PASSWORD=YouPass\n\n\nChangelog: 22.5 (2022-05-08)\n----------------------------\n- Replaced attrs with dataclasses\n- Added support for python 3.10\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftefra%2Fpydrag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftefra%2Fpydrag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftefra%2Fpydrag/lists"}