pydatpiff 2.1.0

Creator: bradpython12

Last updated:

Add to Cart

Description:

pydatpiff 2.1.0

Pydatpiff
PyDatpiff - 🎶 Unofficial Datpiff Music Application. Play and download the latest Hip-Hop and RnB songs.

supports windows, mac, and linux
python 3.7 - above

Dependencies
PyDatpiff requires:

see requirements: requirements.txt
python >= 3.7

Installation
The default media player uses VLC to play music.
For systems that are incompatible with VLC, MPV will be used as the fallback player.
VLC - VideoLan Client media player and framework.
MPV - MPV Framework. ( Supports IOS, Android and Linux Systems )

For linux based systems,   use apt-get to install required repos
VLC
sudo apt-get install vlc

MPV
sudo apt-get install mpv

Install Pydatpiff Module
pip3 install pydatpiff


Pydatpiff Category & Description
Category reference a mixtapes level or ratings. Visit Datapiff for more info.




Category
Description




hot
Mixtape that are hot for the week.


new
Mixtape that are brand-new or just release.


top
Mixtape that are top-ranking.


celebrated
Top ranking celebrity mixtapes.


popular
Popular mixtapes available.


exclusive
Exclusive mixtapes.


most download
Most downloaded mixtapes.


most listen
Most listen mixtapes.


most favorite
Favorite mixtapes.


highest rating
Mixtape with the highest rating.




Mixtape
pydatpiff.Mixtape - PyDatpiff Mixtape class is query for the latest music by either referencing a category or by searching for a particular artist or mixtape.
Import PyDatpiff module and Intialize Mixtape class
Mixtape can accept up to three arguments: category , search and limit.
Either argument category or search should be used at a given time. If no arguments are pass, "category" will be set to "hot" by default.

params: category , search, limit:


category :

'hot' , 'new', 'top',celebrated', 'popular', 'exclusive', 'most download', ' most listen', 'most favorite',' highest rating'



search:

artist name or artist mixtape name.



limit:

maximum amount of mixtapes to return. default=600





Create an Instance of the Mixtape class
from pydatpiff.mixtapes import Mixtape

mix = Mixtape(category='hot')
# -- OR --
# Search for an artist's mixtape
mix = Mixtape(search='Jay-Z')

# To view all available mixtapes
mix.mixtapes

['Creative Control', 'Carter Collection (15th Anniversary)', 'Viva La Hova', 'The Best Of Jay-z : 25th Anniversary', 'Jay-z - If I Should Die Vol. 1 (the Best Of Jay-z)', 'Jay-Z: The Unheard C lassics', 'Jay-z Underground Mixes And Mashes Disk 2', 'Iceburgz Ent Dj Smokeshop Presents -big Tingz-pt.1 Classic Beefs Nas,jay-z And More', 'The Best Of Jay-z Old Vs New', 'The Best Of Jay-z & Biggie Smalls', 'Jay-z Live From Glastonbury ', 'Jay-z Underground Mixes And Mashes disk 1', 'Jay-z - Remixes',..etc ]

Media
pydatpiff.Media - PyDatpiff class that allow users to play and download songs
Here are somethings you can do with Pydtapiff Media

find_song - Find any song made by an artist.
play - Plays songs from a mixtape.
download - Download a song from mixtape.
download_album - Download all songs from an mixtape.


Setup and play song from a mixtape
Setting media player with a mixtape from above.

Mixtape: ['Creative Control', 'Carter Collection (15th Anniversary)', ..etc]

Mixtape can be reference either by index or by its album name.
Index starts at one (1) not zero (0) .
from pydatpiff.mixtapes import Mixtape
from pydatpiff.media import Media

mix = Mixtape(search="Jay-Z")

# Initialize Media with the Mixtape's object
media = Media(mix)

# Set the media player to a particular mixtapes.
media.setMedia('Creative Control')
# -- OR --
media.setMedia(1) # set media by index. 1='Creative Control'

# View all songs in current mixtape
media.songs

[ 'Jay-Z - Intro', 'Jay-Z - Advantage Carter (Prod. By Green Lantern)',
'Jay-Z - Welcome 2 Atlanta V103 Feat. Young Jeezy & DJ Greg Street' , "Jay-Z - Jay's Back ASAP",
'Jay-Z - Live In London',
'Jay-Z - Green Magic',
'Jay-Z - Brooklyn Sound Boy',
'Jay-Z - Child Abuse (Prod. By Green Lantern)',
'Jay-Z - Jay-Z Speaks On Green Lantern',
'Jay-Z - Flashy Life',
'Jay-Z - Got Me On My Shit (Prod. By Green Lantern)',
..etc
]


     



PLAYING A SONG
Songs can be played either by referencing the song index or name.
Song's name do not have to be an exact match.
# Play a song from current mixtape.
media.play('Welcome')

# -- OR --

media.play(3)

# Play Song - ♬♬♬
# Song: Jay-Z - Welcome 2 Atlanta V103 Feat. Young Jeezy & DJ Greg Street
# Size: 1.91 MB

     



FIND A SONG

. . . Can't find that song you been looking for??
No worries... We got you covered!
Find any song made by an artist using the find_song method in media.

search by song's name.
search by album's name.

media.find_song
# Search for a song
media.find_song('green lan') # returns mixtape's index and name

# Search results
[
(1, 'Creative Control'),
(36, 'Headliner & Legends (Jay-Z Freestyles) '),
(69, 'Power Us Up( Jay-z, Kanye West, Swizz Beatz)'),
(172, 'J3 Rocnation '),(254, "Bakin' Session")
]


CONTROLLING MEDIA PLAYER
Media player can rewind , fast-forward , pause , stop and control volume of song.
Using media.player, you will have complete control over your music player.
Simply create a variable player = media.player

info - get information about a song
name - get name of current song.
duration - get duration of track.
rewind - rewind track
ffwd - fast-forward track
play - play current ( track must be paused or stop ).
pause - pause/unpause track.
stop - stop track.
volume - set the volume level (1 - 100).
volume_up - increase volume ( default: increase by 5).
volum_down - decrease volume ( default: decrease by 5).

# Create an player object to control the media
player = media.player

# Rewind Song ⏪
player.rewind()
player.rewind(10) # rewind 10 sec ago

# Fast-Forward Song ⏩
player.ffwd()
player.ffwd(10) # fast-forward 10 sec ahead

# Pause Song ⏸
player.pause

# Stop Song ⏹
player.stop # stop song

# Control Volume 🔊
player.volume(50) # set media volume to 50
player.volume_up(5) # set media volume up 5 steps
player.volume_down(5) # set media volume down 5 steps

DOWNLOAD SONGS AND ALBUMS

Download Song


media.download


params: song , output, and rename


song : index or name of song.


output : directory to save song. *(default: current directory)


rename : rename song. (optional)







Download Album


media.download_album

params: output
output : directory to save song. (default: current directory)



# Download a single song
media.download(3,output="directory_to_save_song")
# -- OR --
media.download('Welcome',output="directory_to_save_song")

# Download full album
media.download_album(output='directory_to_save_album')


LINKS

Code
PyPI
Issues & Bugs

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.