nrk-psapi


Namenrk-psapi JSON
Version 0.10.1 PyPI version JSON
download
home_pagehttps://github.com/bendikrb/nrk-psapi
SummaryUnofficial python library for interacting with the NRK Podcast API.
upload_time2024-11-13 15:03:44
maintainerNone
docs_urlNone
authorBendik R. Brenne
requires_python<4.0,>=3.12
licenseMIT
keywords podcast api-client unofficial
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # nrk-psapi

[![GitHub Release][releases-shield]][releases]
[![Python Versions][py-versions-shield]][py-versions]
![Project Maintenance][maintenance-shield]
[![License][license-shield]](LICENSE.md)
![Made with Love in Norway][madewithlove-shield]

[![Build Status][build-shield]][build]
[![Code coverage][codecov-shield]][codecov]


Asynchronous Python client for the NRK Podcast/Radio API

## Installation

```bash
pip install nrk-psapi
```

## Usage

The following are some basic examples of how to use the library.

Get information about a specific podcast:

```python
import asyncio

from nrk_psapi import NrkPodcastAPI


async def main():
    """Main function."""
    async with NrkPodcastAPI() as client:
        podcast = await client.get_podcast(podcast_id="desken_brenner")
        print(podcast)


if __name__ == "__main__":
    asyncio.run(main())
```

Get all episodes for a specific podcast:

```python
episodes = await client.get_podcast_episodes(podcast_id="desken_brenner")
for episode in episodes:
    print(episode)
```

Search for a specific podcast:

```python
search_results = await client.search(
    query="Norsk", search_type=SearchResultType.PODCAST
)
for result in search_results.hits:
    print(result)
```

Get curated podcasts:

```python
curated_podcasts = await client.curated_podcasts()
for section in curated_podcasts.sections:
    print(section)
    for podcast in section.podcasts:
        print(podcast)
```


## Contributing

If you'd like to contribute to the project, please submit a pull request or open an issue on the GitHub repository.

## License

nrk-psapi is licensed under the MIT license. See the LICENSE file for more details.

## Contact

If you have any questions or need assistance with the library, you can contact the project maintainer at @bendikrb.

[license-shield]: https://img.shields.io/github/license/bendikrb/nrk-psapi.svg
[license]: https://github.com/bendikrb/nrk-psapi/blob/main/LICENSE
[releases-shield]: https://img.shields.io/pypi/v/nrk-psapi
[releases]: https://github.com/bendikrb/nrk-psapi/releases
[build-shield]: https://github.com/bendikrb/nrk-psapi/actions/workflows/test.yaml/badge.svg
[build]: https://github.com/bendikrb/nrk-psapi/actions/workflows/test.yaml
[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg
[py-versions-shield]: https://img.shields.io/pypi/pyversions/nrk-psapi
[py-versions]: https://pypi.org/project/nrk-psapi/
[codecov-shield]: https://codecov.io/gh/bendikrb/nrk-psapi/graph/badge.svg?token=011O5N9MKL
[codecov]: https://codecov.io/gh/bendikrb/nrk-psapi
[madewithlove-shield]: https://madewithlove.now.sh/no?heart=true&colorB=%233584e4


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bendikrb/nrk-psapi",
    "name": "nrk-psapi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "podcast, api-client, unofficial",
    "author": "Bendik R. Brenne",
    "author_email": "bendik@konstant.no",
    "download_url": "https://files.pythonhosted.org/packages/ec/5b/4cd1ef7f1ce75123917d41505a6942ff7e0ea2896884009f3446cfb88a7b/nrk_psapi-0.10.1.tar.gz",
    "platform": null,
    "description": "# nrk-psapi\n\n[![GitHub Release][releases-shield]][releases]\n[![Python Versions][py-versions-shield]][py-versions]\n![Project Maintenance][maintenance-shield]\n[![License][license-shield]](LICENSE.md)\n![Made with Love in Norway][madewithlove-shield]\n\n[![Build Status][build-shield]][build]\n[![Code coverage][codecov-shield]][codecov]\n\n\nAsynchronous Python client for the NRK Podcast/Radio API\n\n## Installation\n\n```bash\npip install nrk-psapi\n```\n\n## Usage\n\nThe following are some basic examples of how to use the library.\n\nGet information about a specific podcast:\n\n```python\nimport asyncio\n\nfrom nrk_psapi import NrkPodcastAPI\n\n\nasync def main():\n    \"\"\"Main function.\"\"\"\n    async with NrkPodcastAPI() as client:\n        podcast = await client.get_podcast(podcast_id=\"desken_brenner\")\n        print(podcast)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nGet all episodes for a specific podcast:\n\n```python\nepisodes = await client.get_podcast_episodes(podcast_id=\"desken_brenner\")\nfor episode in episodes:\n    print(episode)\n```\n\nSearch for a specific podcast:\n\n```python\nsearch_results = await client.search(\n    query=\"Norsk\", search_type=SearchResultType.PODCAST\n)\nfor result in search_results.hits:\n    print(result)\n```\n\nGet curated podcasts:\n\n```python\ncurated_podcasts = await client.curated_podcasts()\nfor section in curated_podcasts.sections:\n    print(section)\n    for podcast in section.podcasts:\n        print(podcast)\n```\n\n\n## Contributing\n\nIf you'd like to contribute to the project, please submit a pull request or open an issue on the GitHub repository.\n\n## License\n\nnrk-psapi is licensed under the MIT license. See the LICENSE file for more details.\n\n## Contact\n\nIf you have any questions or need assistance with the library, you can contact the project maintainer at @bendikrb.\n\n[license-shield]: https://img.shields.io/github/license/bendikrb/nrk-psapi.svg\n[license]: https://github.com/bendikrb/nrk-psapi/blob/main/LICENSE\n[releases-shield]: https://img.shields.io/pypi/v/nrk-psapi\n[releases]: https://github.com/bendikrb/nrk-psapi/releases\n[build-shield]: https://github.com/bendikrb/nrk-psapi/actions/workflows/test.yaml/badge.svg\n[build]: https://github.com/bendikrb/nrk-psapi/actions/workflows/test.yaml\n[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg\n[py-versions-shield]: https://img.shields.io/pypi/pyversions/nrk-psapi\n[py-versions]: https://pypi.org/project/nrk-psapi/\n[codecov-shield]: https://codecov.io/gh/bendikrb/nrk-psapi/graph/badge.svg?token=011O5N9MKL\n[codecov]: https://codecov.io/gh/bendikrb/nrk-psapi\n[madewithlove-shield]: https://madewithlove.now.sh/no?heart=true&colorB=%233584e4\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Unofficial python library for interacting with the NRK Podcast API.",
    "version": "0.10.1",
    "project_urls": {
        "Documentation": "https://nrk-psapi.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/bendikrb/nrk-psapi",
        "Repository": "https://github.com/bendikrb/nrk-psapi"
    },
    "split_keywords": [
        "podcast",
        " api-client",
        " unofficial"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "be294da3327e846e49e55ca0bc2b0f692aec3024d759c6ba28a192775098510e",
                "md5": "603541482f53d8677bea260cf5c13c72",
                "sha256": "00f5c404ddb2d101e290fe175fa4ccc7ac35cf45cf9fea1514a336af862044e0"
            },
            "downloads": -1,
            "filename": "nrk_psapi-0.10.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "603541482f53d8677bea260cf5c13c72",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 51527,
            "upload_time": "2024-11-13T15:03:43",
            "upload_time_iso_8601": "2024-11-13T15:03:43.293272Z",
            "url": "https://files.pythonhosted.org/packages/be/29/4da3327e846e49e55ca0bc2b0f692aec3024d759c6ba28a192775098510e/nrk_psapi-0.10.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec5b4cd1ef7f1ce75123917d41505a6942ff7e0ea2896884009f3446cfb88a7b",
                "md5": "c1413f45997d66aeabf6014d849248c4",
                "sha256": "c55830d7fdc7647babdf3f694b04f7074592f74fa73996c5e8dd0a1880b980f2"
            },
            "downloads": -1,
            "filename": "nrk_psapi-0.10.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c1413f45997d66aeabf6014d849248c4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 41598,
            "upload_time": "2024-11-13T15:03:44",
            "upload_time_iso_8601": "2024-11-13T15:03:44.469689Z",
            "url": "https://files.pythonhosted.org/packages/ec/5b/4cd1ef7f1ce75123917d41505a6942ff7e0ea2896884009f3446cfb88a7b/nrk_psapi-0.10.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-13 15:03:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bendikrb",
    "github_project": "nrk-psapi",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "nrk-psapi"
}
        
Elapsed time: 0.39509s