Skip to main content

A Python package that allows users to gather advanced artist statistics from Spotify

Project description

log github events log github events multiple versions

Python Package Exercise

An exercise to create a Python package, build it, test it, distribute it, and use it. See instructions for details.

Package Description

The package pytify_stats is a Python package that runs basic stats gathered from the Spotify API. It can currently get stats such as artist information, track information, and an artist's top ten tracks.

How to Use

Here is how to set it up:

  1. Run this code in the terminal:
pipenv install -i https://test.pypi.org/simple/ pytify-stats==0.0.3.3
  1. Import it in your python file:
from pytify_stats import client
  1. Create a new account or log in here. Go to the dashboard, create an app and retrieve your new ID and SECRET

  2. Authenicate using the Client class

The example below demonstrates how to do this:

from pytify_stats import client

spy = client.Client(CLIENT_ID, CLIENT_SECRET)

album = spy.get_album("KOD")

top_ten = spy.get_top_ten("J. Cole")

song = spy.get_song("She Knows")

print(album)
print(top_ten)
print(song)

Put your client_id and client secret you've recieved from Spotify in place of the parameters of the Client class

How to Contribute

  1. Download the source code and open it on a code editor

  2. Install pipenv and install the following:

pipenv install requests pipenv install python-dotenv pipenv install pytest

  1. Make changes and run unit test for it

  2. Push changes onto a new branch on GitHub

  3. Make a pull request and wait for a review. If accpeted, the branches will be merged and the new code will be uploaded to PyPi

Contributors

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

pytify_stats-0.0.9.tar.gz (43.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytify_stats-0.0.9-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file pytify_stats-0.0.9.tar.gz.

File metadata

  • Download URL: pytify_stats-0.0.9.tar.gz
  • Upload date:
  • Size: 43.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for pytify_stats-0.0.9.tar.gz
Algorithm Hash digest
SHA256 ac9790e31008df6b90d80222c54dfd79480ef9fd6881d5462be19c0d17cf2341
MD5 3bf53f1629ecee28ee6b553dc07daf10
BLAKE2b-256 4bb67a43604f266f3260bfb0b3500765e00c7c5897ebddc0b09e499fb449021c

See more details on using hashes here.

File details

Details for the file pytify_stats-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: pytify_stats-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for pytify_stats-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 962643fc08c4b868eec3a5c9a157fb2e73a043aa03b26036c7583121fc3a95b0
MD5 b533fa307d1f5ae5bab2f012a284a6d2
BLAKE2b-256 e38c6b25281f8746de6307f62d2d77132d38d7792cc8b42a8c28061936d2d184

See more details on using hashes here.

Supported by

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