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-2.0.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

macaronipm-2.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for macaronipm-2.0.0.tar.gz
Algorithm Hash digest
SHA256 0a7ebf6b285edd0e2b5b0b676c1af4a2d770d215ae452e7e7fb511702a2b1e45
MD5 f837e0167888c07a7918def721f811c5
BLAKE2b-256 6c85507e85f76916f5ed73ba4ca35facd388b75a6dae1eab7bf2b0c4c6923d44

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for macaronipm-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49a754f9e503c893a478bd2670b20057d137bc5e376b35a625cd5c6cd8d5dbd8
MD5 be577ac1ec3e63a15cbc20de42dedb08
BLAKE2b-256 a635435ce44ffbf3c6227af4d9e8a64ebad1b8d4531f011d78e85aeb4ba12eee

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