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 milesToMuppetspython3 -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)
- When initializing the class, if you want it to print its session data, initialize the class as so.
-
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)
- If you want to enable printing, set "print_cycle" to 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.
Metadata
Release files for MilesToMuppets 0.0.19
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| milestomuppets-0.0.19.tar.gz | 10.9 kB | Without provenance | Details for milestomuppets-0.0.19.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| milestomuppets-0.0.19-py3-none-any.whl | Python 3 | none | any | Details for milestomuppets-0.0.19-py3-none-any.whl |
Total release size: 22.9 kB
Release files / milestomuppets-0.0.19.tar.gz
| Download URL | milestomuppets-0.0.19.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb5abc606d8b6aca556c6d755f5b88b2a31ca9d8b6ce7c895a600bbc44f9f43f
|
|
BLAKE2b-256 checksum How to use checksums |
ea6f640941f29c4598ca5f66dbdaa192873b193952276c5241f9c0129b10be3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.13
|
Release files / milestomuppets-0.0.19-py3-none-any.whl
| Download URL | milestomuppets-0.0.19-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a4d24c59dcef8a8f7a6475121f59c8eca1170a757e6b3b87ec42d58f698f207
|
|
BLAKE2b-256 checksum How to use checksums |
b3f4f88005392b2fa3ddf658c9fc6d401f0fd8d37752970117c2110dec35310b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.13
|
Security for MilesToMuppets 0.0.19
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.