Skip to main content

Unofficial Datpiff Mixtape player - Download and play the newest Hip-Hop and RnB Songs.

Project description

PyPI Build

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:

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
 ]

      gif-mixtapes


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

      gif-media


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

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

pydatpiff-2.1.0.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

pydatpiff-2.1.0-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

Details for the file pydatpiff-2.1.0.tar.gz.

File metadata

  • Download URL: pydatpiff-2.1.0.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.3

File hashes

Hashes for pydatpiff-2.1.0.tar.gz
Algorithm Hash digest
SHA256 1e0fdb25fda36cce071de3fd61e979adfe989d6537af9b9d47c2cdda7aee5d67
MD5 58b2b4c8e11e069e0b8b20b2ff728b70
BLAKE2b-256 73922ecc301b9d7f8659eca6b5b188d65c0ac0ac8caa2d42d49cd482461ab032

See more details on using hashes here.

File details

Details for the file pydatpiff-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: pydatpiff-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.3

File hashes

Hashes for pydatpiff-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bda24f25731a31bcd0f9b87fae35b4282832f595e859233341656b1519cdb922
MD5 7f175f846effb944147d964e73fe4054
BLAKE2b-256 b0e21cf7fafc697e36852383a53f806910652b9f44fa1a2c1fc4418b18688caf

See more details on using hashes here.

Supported by

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