Skip to main content

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')

Metadata

Release files for pydatpiff 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydatpiff 2.1.0
File Size Uploaded Provenance Actions
pydatpiff-2.1.0.tar.gz 35.2 kB Without provenance Details for pydatpiff-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pydatpiff 2.1.0
File Interpreter ABI Platform Actions
pydatpiff-2.1.0-py3-none-any.whl Python 3 none any Details for pydatpiff-2.1.0-py3-none-any.whl

Total release size: 71.6 kB

Release files / pydatpiff-2.1.0.tar.gz

Download URL pydatpiff-2.1.0.tar.gz
Size 35.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1e0fdb25fda36cce071de3fd61e979adfe989d6537af9b9d47c2cdda7aee5d67
BLAKE2b-256 checksum
How to use checksums
73922ecc301b9d7f8659eca6b5b188d65c0ac0ac8caa2d42d49cd482461ab032
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.3

Release files / pydatpiff-2.1.0-py3-none-any.whl

Download URL pydatpiff-2.1.0-py3-none-any.whl
Size 36.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bda24f25731a31bcd0f9b87fae35b4282832f595e859233341656b1519cdb922
BLAKE2b-256 checksum
How to use checksums
b0e21cf7fafc697e36852383a53f806910652b9f44fa1a2c1fc4418b18688caf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.3

Security for pydatpiff 2.1.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page