======
> A third-party API for **libsyn**.
___
Installation
------------
In order to install _libpyn_, run this command on the terminal
``` console
foo@bar:~$ pip install libpyn
```
___
Features
--------
* ### The Podcast class <a name="podcast-class"></a>
The _Podcast class_ is the main feature of this package.
``` python
# Import statement
from libpyn.podcast import Podcast
```
In order to create an instance of the Podcast class, pass a link to a _libsyn_ channel in with the instance declaration.
``` python
channel = 'https://therabbithole.libsyn.com/'
example = Podcast(channel)
```
Once initialized, the Podcast class contains useful information about the podcast.
``` python
example.name = # Name of the podcast channel
self.mp3list = # List of episodes, each episode saved as a dictionary
self.htmllink = # Link to the podcast's website
```
Each dictionary in _self.mp3list_ contains these key/value pairs:
``` python
podcast = {} # Dictionary for storing podcast info
podcast['title'] = # Name of episode
podcast['date'] = # Publish date
podcast['mp3'] = # Link to mp3 file
podcast['image'] = # Channel logo
```
* ### Downloading podcasts
In order to download the mp3 files of a podcast channel, use the **download()** function.
``` python
# This will download the mp3 files in a directory named after the podcast channel
# in the Downloads directory
example.download()
```
A specific _path_ can be specified, the name of the directory (_foldername_) in which the mp3 files will be stored can also be specified. If the foldername is not specified, it will be the name of the channel. (Spaces are replaced with underscores.)
``` python
path = 'path/to/store/mp3'
directory = '/files'
example.download(path=path, foldername=directory)
```
* ### iframes
In order to get iframes of the latest episodes to embed on a webpage, use the **iframes()** function.
It returns a dictionary where the key is the title of the episode (if one is present) and the value is the iframe (if iframes are present).
``` python
iframesList = example.iframes()
```
___
Changelog
---------
### == v1.0.3 ==
* _iframes function only runs if iframes are present_
* _iframes function generates titles when there is no title given_
### == v1.0.2 ==
* _iframes now returns a dictionary. (key = Title, value = iframe)_
### == v1.0.1 ==
* _Fix bugs involving download function_
* _Remove HTML tags from podcast.name attribute_
* _Fix logger, log always in same directory as podcast.py_
### == v1.0.0 ==
* _Initial release_
Metadata
Release files for libpyn 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| libpyn-1.0.3.tar.gz | 4.2 kB | Without provenance | Details |
Release files / libpyn-1.0.3.tar.gz
| Download URL | libpyn-1.0.3.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7cd3605ea8bbfe73e629c6c11d8cf918604d08dd2f0e212aec79fcd3f3f8d29c
|
|
BLAKE2b-256 checksum How to use checksums |
2bcad38fc0e6dc87cedb61956504453587f6102c6e56a17ea3777042497da741
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
|
Security for libpyn 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.