Skip to main content

A conversion package to convert Miles to how many songs you can listen to from the Muppets Album

Project description

Miles to Muppets

A calculator that converts mile distance to how many Muppets songs you can listen to.

Setup

  • first, install milesToMuppets with pip.

    • pip install milesToMuppets
    • python3 -m pip install milesToMuppets
  • next, import muppet from milesToMuppets
    from milesToMuppets import muppet

  • in the code, set up your class object, passing in your Spotify client id and client secret (which can be obtained from Spotify for Developers for free)
    foo = muppet.MilesToMuppets(client_id = client_id, client_secret = client_secret)

    • When initializing the class, if you want it to print its session data, initialize the class as so.
      foo = MilesToMuppets(client_id = client_id, client_secret = client_secret, do_print = True)
  • next, set the distance you are going, in miles. This number can be anything, but 60 is used as an example here.
    foo.set_mile_distance(60)

  • set the speed at which you are traveling, in mph. This number can be anything, but 30 is used as an example here.
    foo.set_speed(30)

  • choose what album you want to use. To do this, you need to print out the list of valid albums and pick the number associated with it. You can do this by requesting the current album dictionary, as shown below.

    • albums = foo.key_list
  • then, put your selection into the following function. In this case, we are using 1.
    foo.choose_album(1)

  • finally, run the function to evaluate the album and return a dictionary with the results.
    foo.evaluate_album()

    • If you want to disable printing, set "print_cycle" to false.
      foo.evaluate_album(print_cycle = False)
    • If you want to disable the delay between prints, set "do_delay" to false.
      `foo.evaluate_album(do_delay = False)

Other functions

  • foo.get_session_data() - will return your session token, and your auth header in a dict.

    foo.get_help() - Will print out some information to help you.

    foo.get_license() - Will print out what license this project is using.

    foo.get_credits() - Will print out the credits for the development of this project.

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

milestomuppets-0.0.9.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

milestomuppets-0.0.9-py3-none-any.whl (9.9 kB view hashes)

Uploaded Python 3

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