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.1.tar.gz (3.1 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.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: macaronipm-1.1.1.tar.gz
  • Upload date:
  • Size: 3.1 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.1.tar.gz
Algorithm Hash digest
SHA256 5184da3d07adcf9a02cc976d6a69f13d020a71e87635993108b05bc1d04a1204
MD5 8d4a467b16c6061ff5a0c78fe1ad3e44
BLAKE2b-256 3cadcedea1a9d338b3a0eb70e6d239c02490f01fea0ed659f71fa0e810a4433b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: macaronipm-1.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 edf8e250ab97ef4f227adccce2f96a71076a93302758f1d973524abe25572c7f
MD5 ce02e1e9d19f2d49d5316c95d7fc0e22
BLAKE2b-256 12aa63af34cb6d893aeedaa46dabe12a53f6ed29c904f419bc6681f96d1ce159

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