Skip to main content

A Minecraft API Wrapper

Project description

Minecraft API

This a simple package to wrap many APIs, including the Mojang and Hypixel ones

Requires Python 3.7+

Usage guide for Package

Import the package with

import mcwrapper

Or the preferred way

from mcwrapper import hypixel

The second way allows you to save some lines writing the actual code. To actually use this, create a Bedwars, Skywars, or Hypixel object. You must pass in a username and api key for the hypixel-related objects

**Example**

from mcwrapper import hypixel

object = hypixel.Bedwars("ThePotatoPowers", "yourapikeyhere")

To get information from this object, use the stats() method. Then, the object's attributes will be set

from mcwrapper import hypixel

object = hypixel.Bedwars("ThePotatoPowers", "yourapikeyhere")
object.stats()
print(object.wins) #prints bedwars wins for ThePotatoPowers

Skins

Create a skin object by first importing the skin file from the package from mcapiwrapper import skin The class takes a username argument

The skingrab method will return a link with the user's skin. You can access this with the skin attribute

The body method will return a link with the user's body. You can access this with the body attribute

The head method will return a link with the user's head. You can access this with the head attribute

The avatar method will return a link with the user's head in 2D. You can access this with the avatar attribute

Bedwars

As shown above, import hypixel from mcapiwrapper. Then, create a Bedwars object which takes a username and apikey parameter (in that order)

After the stats method is run, you can access all attributes of the Bedwars object. This includes:

  • display (displayname)
  • wins
  • losses
  • deaths
  • kills
  • coins
  • final_kills
  • final_deaths
  • beds_destroyed
  • beds_lost
  • winstreak
  • level

Skywars

As shown above, import hypixel from mcapiwrapper. Then, create a Skywars object which takes a username and apikey parameter (in that order)

After the stats method is run, you can access all attributes of the Skywars object. This includes:

  • wins
  • losses
  • deaths
  • kills
  • coins
  • souls
  • heads
  • winstreak
  • display

Hypixel

As shown above, import hypixel from mcapiwrapper. Then, create a Hypixel object which takes a username and apikey parameter (in that order)

After the stats method is run, you can access all attributes of the Hypixel object. This includes:

  • firstLogin
  • lastLogin
  • nameHistory
  • display

Contribute

Support

If you are having issues, please let me know @ zkarim7676@gmail.com

License

The project is licensed under the MIT license.

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

mcwrapper-1.38.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

mcwrapper-1.38-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page