Skip to main content

A PenguinMod API Wrapper

Project description


layout: page title: MacaroniPM - A PenguinMod API Wrapper for Python. permalink: /macaroni/

What is Macaroni's purpose?

Its purpose is it easly use PenguinMod's API with python so you don't have to deal with post requests!

Installation

Just type pip install macaronipm or by installing the The python file it self

Documentation

macaronipm.SetToken() and macaronipm.TOKEN

Sets your token into the macaronipm.TOKEN variable.

Required for macaronipm.LoveToggle(), macaronipm.VoteToggle(), macaronipm.follow(), and macaronipm.featured().

Example:

macaronipm.SetToken("ABCDEFG1234567")
print(macaronipm.TOKEN)

macaronipm.SetProject() and macaronipm.PID

Sets your project id into the macaronipm.PID variable.

Required for macaronipm.LoveToggle() and macaronipm.VoteToggle().

Example:

macaronipm.SetProject("ABCD1234")
print(macaronipm.PID)

macaronipm.LoveToggle(toggle)

Toggles the heart button in a project's page.

Example:

macaronipm.LoveToggle("true")

The text "true" must be in quotes. {: .prompt-warning }

macaronipm.VoteToggle(toggle)

Toggles the check button in a project's page.

Example:

macaronipm.VoteToggle("true")

The text "true" must be in quotes. {: .prompt-warning }

macaronipm.follow(target, toggle)

Follows a user/target.

Example:

macaronipm.follow("koffeejava", "true")

macaronipm.FeaturedPop() and macaronipm.featured

Gets the featured page ans stores it into the macaronipm.featured variable.

Example:

macaronipm.FeaturedPop()
print(macaronipm.featured)

macaronipm.GetPfp(target) and macaronipm.PfpURI

Gets a user/target's pfp and stores it in the macaronipm.PfpURI variable.

The pfp gets stored as a dataURI. {: .prompt-info }

Example:

macaronipm.follow("koffeejava")
print(macaronipm.PfpURI)

It is recomended not to print the data uri {: .prompt-warning }

This function requires you to set the token via macaronipm.SetToken() {: .prompt-warning }

macaronipm.GetThumbnail()

Gets the project thumbnail from the macaronipm.PID variable and stores it to the variable macaroni.ThumbURI

The thumbnail gets stored as a dataURI. {: .prompt-info }

Example:

macaronipm.SetProject("ABCD1234")
macaronipm.GetThumbnail()
print(macaronipm.ThumbURI)

This function requires you to set the PID via macaronipm.SetProject() {: .prompt-warning }

Just like GetPfp, it is recomended not to print the data uri {: .prompt-warning }

macaronipm.GetProjectMeta() and macaronipm.ProjectMeta

Grabs metadata from projects via the macaronipm.PID and stores it to the macaronipm.ProjectMeta variable.

Example:

macaronipm.SetProject("ABCD1234")

macaronipm.GetProjectMeta()

print(macaronipm.ProjectMeta)

macaronipm.ProjectMeta outputs non-parsed json. {: .prompt-info }

This function requires you to set the PID via macaronipm.SetProject() {: .prompt-warning }

macaronipm.GetUserMeta(target) and macaronipm.UserMeta

Gets user/target's metadata and stores it to macaronipm.UserMeta

Example:

macaronipm.SetToken("ABCDEFG1234567")
macaronipm.GetUserMeta("koffeejava")
print(macaronipm.UserMeta)

macaronipm.UserMeta outputs non-parsed json. {: .prompt-info }

This function requires you to set the token via macaronipm.SetToken() {: .prompt-warning }

This function requires you to set the PID via macaronipm.SetProject() {: .prompt-warning }

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

macaronipm-1.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

macaronipm-1.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file macaronipm-1.1.0.tar.gz.

File metadata

  • Download URL: macaronipm-1.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for macaronipm-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f66691fd26eefe85c1672f08bac1e34880eeaff8323c3cef1aeafb92227a04cc
MD5 6557be2b088984b39933a40c30149ebe
BLAKE2b-256 55fda08e856b591b242251048cc5cb8c57f3187ef46a017ca03235cb8ce0cdbb

See more details on using hashes here.

File details

Details for the file macaronipm-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: macaronipm-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for macaronipm-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4931c8828ca46e91eec747ffc506727fa0c2c19fdc69db28e00b3ca4960015c5
MD5 8615e3bf0073d73d4b5663e52cc6192b
BLAKE2b-256 a4fe3ec82ac36a403ffd2cc08c85ae8f52ad86cf461cba98388c160cd288a589

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