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

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.1.tar.gz (32.5 kB view details)

Uploaded Source

Built Distribution

nrk_psapi-0.9.1-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nrk_psapi-0.9.1.tar.gz
Algorithm Hash digest
SHA256 d12d3a8ddaad2f9864eabfe4757d50eb6569b723fcc93aefeb832e5ae42e11f5
MD5 f975d035c1b949199bf36d34a500162b
BLAKE2b-256 2010e136c221dc736a20b1b87038972960030c00a1fffaebf80d3aac5804081d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for nrk_psapi-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b275e1b6e882c405b19b948f7eba413da293b7d54858b6a4deca258930b0a0d
MD5 d40c83176da2fb113d468a3b958036d1
BLAKE2b-256 c1c8676028f4de68f9cb6c369266d20a3577cdef004e9b428fa447f2d725263c

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