Unofficial python library for interacting with the NRK Podcast API.
Project description
nrk-psapi
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nrk_psapi-0.10.1.tar.gz
.
File metadata
- Download URL: nrk_psapi-0.10.1.tar.gz
- Upload date:
- Size: 41.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c55830d7fdc7647babdf3f694b04f7074592f74fa73996c5e8dd0a1880b980f2 |
|
MD5 | c1413f45997d66aeabf6014d849248c4 |
|
BLAKE2b-256 | ec5b4cd1ef7f1ce75123917d41505a6942ff7e0ea2896884009f3446cfb88a7b |
File details
Details for the file nrk_psapi-0.10.1-py3-none-any.whl
.
File metadata
- Download URL: nrk_psapi-0.10.1-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.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00f5c404ddb2d101e290fe175fa4ccc7ac35cf45cf9fea1514a336af862044e0 |
|
MD5 | 603541482f53d8677bea260cf5c13c72 |
|
BLAKE2b-256 | be294da3327e846e49e55ca0bc2b0f692aec3024d759c6ba28a192775098510e |