Skip to main content

Unofficial python library for interacting with the NRK Podcast API.

Project description

nrk-psapi

GitHub Release Python Versions PyPI Downloads 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.11.2.tar.gz (40.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nrk_psapi-0.11.2-py3-none-any.whl (51.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nrk_psapi-0.11.2.tar.gz
Algorithm Hash digest
SHA256 40aea4b54901973835a1265609f23f1246596ea6b58082da903479997934aa11
MD5 aa9854420860ef7a39a0b3f335ccdc08
BLAKE2b-256 1c8d5a29b3277746a74479b22d55792c8ed2ba70a720508c043408469e53485d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for nrk_psapi-0.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a7ad864fdb3a23c137f8a25c9c76e9faa134c1ae1cf64bb94bf8d1e0bc508e19
MD5 a4c0a2b9687805d74411c0dd5bf6b8ee
BLAKE2b-256 b68985bc723cb4dd8370bf2723462cb7f2ce8ccc6b8f8baa9015abfbd67ce915

See more details on using hashes here.

Supported by

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