Skip to main content

Unofficial python library for interacting with the NRK Podcast API.

Project description

nrk-psapi

GitHub Release Python Versions Project Maintenance License Made with Love in Norway

Build Status Code coverage

Asynchronous Python client for the NRK Podcast/Radio API

Installation

pip install nrk-psapi

Usage

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

Get information about a specific podcast:

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:

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

Search for a specific podcast:

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

Get curated podcasts:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nrk_psapi-0.9.5.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

nrk_psapi-0.9.5-py3-none-any.whl (43.2 kB view details)

Uploaded Python 3

File details

Details for the file nrk_psapi-0.9.5.tar.gz.

File metadata

  • Download URL: nrk_psapi-0.9.5.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.7

File hashes

Hashes for nrk_psapi-0.9.5.tar.gz
Algorithm Hash digest
SHA256 280f61ffdc470d559ce5f01e2e7da9edb2ba552a7f31ece3a0b79600b39d3af2
MD5 736c6b10a487c70a0e33cd3bb16ee20c
BLAKE2b-256 d33e473a7a2715ac235430ec1cb176a9cd8754863780068d6d8cf47c322bd00b

See more details on using hashes here.

File details

Details for the file nrk_psapi-0.9.5-py3-none-any.whl.

File metadata

  • Download URL: nrk_psapi-0.9.5-py3-none-any.whl
  • Upload date:
  • Size: 43.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.7

File hashes

Hashes for nrk_psapi-0.9.5-py3-none-any.whl
Algorithm Hash digest
SHA256 987849b59d7c084169e4776bd6ea99914d7a2b3b3139f5ec9069bb758868f53c
MD5 f6ffefc69d154bf0c491db535d49dc9e
BLAKE2b-256 a1fbb78cba2f752bbf9267e6b1d5ee30ceeda0434d2b0cfd574a104a40efc8bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page