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.1.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.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: macaronipm-2.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 f4657204fa1bd0e24e53ae3fb4bea5b69de88fa2c54dd634d559dc8e0b865e28
MD5 89302335bd1169a8062ae1a033eb9d3f
BLAKE2b-256 25594b3eb5ce1e1fc50d0426df85a0ab7e15070c0f9d7ddeaeeb7d96972c8f45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: macaronipm-2.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bcb5cb035e2429ace92fb6f19c45e59dee57ff0027d97d142ac638f981080d70
MD5 afef2c06e4334f0a89e155051224b35a
BLAKE2b-256 e0883da3f279c160e8dccd19657d7d2233fe26b2ff02353879e10d266e8bc87a

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