Getting Started

Introduction #

PyDatpiff ━ is a light weight python command line audio streaming and media service founded on Sep 29, 2020 by CbeDroid. It comes with built-in support for multipl platform such as Windows, Mac, and also Linux. Pydatpiff allows users to stream music from a wide genre of music such as Hip-Hop, RnB, Pop, Jazz and more directly to their device on-demand.

Pydatiff logo

Pydatpiff

The Unofficial Datpiff Music Application. Play and download the latest Hip-Hop and RnB songs.

  • stars
  • issues
  • forks

View on Github - View Full Documentation and Codes

How To Install

Prerequisites #

  • python - Python version 3.3 or above.
  • VLC - VideoLAN Client media player.
  • MPV - A free, open source and cross-platform media player.
Note: Either VLC or MPV must be installed

Installation #

The default media player uses VLCto play music. For systems that are incompatible with VLC, MPV will be used as the fallback player.

Install on Linux
  • # install VLC
  • apt-get install vlc
  • # install MPV
  • apt-get install mpv
  • # install Pydatpiff
  • pip install pydatpiff

Mixtapes

pydatpiff.Mixtapes - Pydatpiff main class used to fetch an artist' mixtape.

Category #

What are categories ..??

  Categories are list of mixtape's groups used to filter mixtapes based on ratings and release dates.

Category Description
hot Mixtapes that are hot for the week.
new Mixtapes that are brand-new or just release.
top Mixtapes 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 Mixtapes with the highest rating.

Creating Mixtapes #

Getting started with Mixtapes

There are two parameters that can be pass to Mixtapes class.

Only one parameter should be called at a time. If no parameter is pass, "category" will be set to "hot" by default.

  • params: category, search and 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
  • import pydatiff
  • mix = pydatiff.Mixtapes(category="hot")
  • # Or Search for a particular artist or mixtape.
  • mix = pydatiff.Mixtapes(search="Kendrick Lamar")
  • mix.mixtapes
  • # View all mixtapes.
  • ['Kendrick Lamar (EP)', 'Kendrick Lamar', 'O.verly D.edicated', 'No Sleep Til NYC', 'K-Dot Training Day', 'C4', 'Black Hippy', 'Hub City Threat: Minor Of The Year', 'KENDRICK LAMAR BEATS (Instrumentals): Kendrick Lamar type beat s instrumentals for Kendrick Lamar', 'Kendrick Lamar Type Beat Instrumentals X Free Beats CD', 'The Best Of Kendri ck Lamar', 'Eargasm! 13.5 (YG, Kendrick Lamar, Kevin Gates, Nicki Minaj, Asap Rocky, 2 Chainz, Curren$y, Future)', 'Kendrick Lamar K.Dot Drops', 'Kendrick Lamar - The Vault Vol 1', 'Kendrick Lamar - The Vault Vol 2', 'Kendrick L amar - The Vault Vol 3', 'Kendrick Lamar - The Vault Vol 4', 'Kendrick Lamar - The Vault Vol 5', 'West Coast Princ e (Kendrick Lamar)', 'Best Of So Far Kendrick Lamar', ...more]
    view all results['Kendrick Lamar (EP)', 'Kendrick Lamar', 'O.verly D.edicated', 'No Sleep Til NYC', 'K-Dot Training Day', 'C4', ' lack Hippy', 'Hub City Threat: Minor Of The Year', 'KENDRICK LAMAR BEATS (Instrumentals): Kendrick Lamar type bea s instrumentals for Kendrick Lamar', 'Kendrick Lamar Type Beat Instrumentals X Free Beats CD', 'The Best Of Kendr ck Lamar', 'Eargasm! 13.5 (YG, Kendrick Lamar, Kevin Gates, Nicki Minaj, Asap Rocky, 2 Chainz, Curren$y, Future)' 'Kendrick Lamar K.Dot Drops', 'Kendrick Lamar - The Vault Vol 1', 'Kendrick Lamar - The Vault Vol 2', 'Kendrick amar - The Vault Vol 3', 'Kendrick Lamar - The Vault Vol 4', 'Kendrick Lamar - The Vault Vol 5', 'West Coast Prin e (Kendrick Lamar)', 'Best Of So Far Kendrick Lamar', 'Dj Femmie Mixtapes Presents Hip Hop Bangers Vol. 4 FEAT. K NDRICK LAMAR AND J.COLE Hosted By King Co', 'Kendrick Lamar Response', 'Kendrick Lamar - King Of The West', 'Earg sm! 16 hosted by Sy Ari (ft. Kevin Gates, Yo Gotti, Asap Rocky, Jeezy, Kendrick Lamar, More)', 'Eargasm! Classic dition 6 (Starring Future X 2 Chainz X Kendrick Lamar)', 'The Literal MIXTAPE: Kendrick Lamar J. Cole - J. Lamar / Good Kid, Cole World (Mixed Prod. by td', 'Eargasm! 7 (Asap Rocky, Yelawolf, Kendrick Lamar, 2 Chainz, Pusha T Nipsey Hussle, Trinidad James)', 'B.O.B pres. Eargasm! 10 (Asap Rocky, Kendrick Lamar, Juicy J, Rich Homie Quan, Yo Gotti, Logic, T.I)', 'J. Cole Vs Kendrick Lamar', 'Overdose Vol#5 Hosted By Tyler Will (Bryson Tiller,kendrick Lamar,Tory Lanez,Ty Dolla Sign, etc...)', 'Kendrick Lamar Humble Reply', 'Kendrick lamar must die', 'Con-troll - endrick Lamar Disses', 'Control Response ( Kendrick Lamar Response Mixtape )', 'Coffin Full Of Diamonds (inspired By Kendrick Lamar)', 'Beats 4 Kendrick Lamar', 'Back Pack (J. Cole x Kendrick Lamar x Drake x Lupe Fiasco Type In trumentals)', 'Smart Vs Kendrick Lamar', 'KONY - The Barrage of Kendrick Lamar', 'Control (remixes) Kendrick Lama Disses ', 'Kendrick Lamar (instrumentals)', 'Kendrick Lamar Man Down', 'So You Wanna Be Signed Vol. 1 Hosted By endrick Lamar', 'Blissful Chill [jcole/ Kendrick Lamar/ Flame]', 'King Kendrick', 'The Poems Of Kendrick', 'Kendr ck Meets Pac The Remixes', 'Kendrick Lamar-the Control Response', 'Music Fiend Presents: Kendrick Cole', 'K.Dot L mar', 'Beats For Kendrick, Beats For Future, Beats For Quavo, Bryson Tiller ', 'Coogi - Mayday ( New Hip Hop Like Lit In Ceylon Juicy J Dj Blak )']

Media

pydatpiff.Media - is class used to load and play an artist's mixtape.

Initializing Media #

Here are some useful things you can do with Media

  • findSong - Find any song made by an artist.
  • play - Plays songs from current album.
  • download - Download current song.
  • downloadAlbum - Download all songs from an album.

Set media player with a mixtape

Mixtape's can be reference either by index or by its album name. Index starts at one (1) not zero (0) .

  • # We pass in the Mixtape object from above
  • media = pydatiff.Media(mix)
  • # Set the media player to a mixtape.
  • media.setMedia(17)
  • # Or reference by name!
  • media.setMedia("Best Of So Far Kendrick Lamar")
  • # Partial naming is also recognized!
  • media.setMedia("Best Of So")
  • # View all available songs
  • media.songs
  • ['Average Joe', 'Celebration', 'Michael Jordan Ft Schoolboy Q', 'Ignorance Is Bliss', 'Growing Apart', 'P**** And Patron Ft. Ab Soul', 'I Do This Ft. Jay Rock', 'The Relevant', "B**** I'm In The Club", 'Dumb It Down', 'Kendrick Lamar', 'Little Johnny', 'Beyonce', 'A Little Appalled', 'L.M.A.O', 'Today', 'Kurupted', 'World Negatives Prod by Sounwa', '150 Day Dreaming', 'Last Real Nigga Alive', "Compton's Finest Ft. H.O.P.E", 'For The Homies', 'Uptown81 Ft. Smoke DZA & Mara Hruby']

Playing Songs #

Songs can be played by referencing either a index or title.

Song's title do not have to be an exact match.
  • # Play song by referencing mixtape's title.
  • media.play("Kurupted")
  • # Or by index.
  • media.play(17)
  • ♬♬ Playing Song ♬♬

    Artist: Kendrick Lamar

    song: Kurupted

    Sixe: Size: 3.44 MB

Media Controls #

pydatpiff.Media.player - is a media controller object used to control a loaded audio track.

Media player allows user to rewind, fast-forward, pause, stop and control volume of music.

  • # Create a player object
  • player = media.player
  • # Rewind ⏪
  • player.rewind()
  • player.rewind(10) # Rewind 10 sec ago
  • # Fast-Forward ⏩
  • player.ffwd()
  • player.ffwd(10) # Fast-Forward 10 sec ahead
  • # Pause ⏸
  • player.pause
  • # Stop ⏹
  • player.stop
  • # Volume 🔊
  • player.volume(10) # Set audio's volume to 50%
  • player.volumeUp(5) # Increase volume level by 5%
  • player.volumeDown(5) # Decrease volume level by 5%

Download Song #

pydatpiff.Media.download - is a method used to download a song from a mixtape.

Here is a some useful arguments that can be passed to the download method.

  • song - index or name of song
  • output - directory to save song *(default: current directory)
  • rename - rename a song *(optional)

Song can be reference either by index or by its name.

  • # Download a single song by index
  • media.download(17,output="directory_to_save_song")
  • # Download a single song by name
  • media.download("humble",output="directory_to_save_song")

Download Album #

pydatpiff.Media.downloadAlbum - is a method used to download a mixtape full album.

  • # Download full album
  • media.downloadAlbum(output="directory_to_save_album")