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 milesToMuppets
    import milesToMuppets

  • 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 = milesToMuppets.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.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. If you do not set a speed, it defaults to 60.
    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.get_albums()

  • then, put your selection into the following function. In this case, we are using 0.
    foo.set_album(0)

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

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

Other functions

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

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

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

  • muppet.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.19.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

milestomuppets-0.0.19-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file milestomuppets-0.0.19.tar.gz.

File metadata

  • Download URL: milestomuppets-0.0.19.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.13

File hashes

Hashes for milestomuppets-0.0.19.tar.gz
Algorithm Hash digest
SHA256 fb5abc606d8b6aca556c6d755f5b88b2a31ca9d8b6ce7c895a600bbc44f9f43f
MD5 086d0c2bdb516cf6fe3ff90172d21684
BLAKE2b-256 ea6f640941f29c4598ca5f66dbdaa192873b193952276c5241f9c0129b10be3c

See more details on using hashes here.

File details

Details for the file milestomuppets-0.0.19-py3-none-any.whl.

File metadata

File hashes

Hashes for milestomuppets-0.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 9a4d24c59dcef8a8f7a6475121f59c8eca1170a757e6b3b87ec42d58f698f207
MD5 1e57bb146fc47dff52b79a8292579eb8
BLAKE2b-256 b3f4f88005392b2fa3ddf658c9fc6d401f0fd8d37752970117c2110dec35310b

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