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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file mcwrapper-1.38.tar.gz.

File metadata

  • Download URL: mcwrapper-1.38.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for mcwrapper-1.38.tar.gz
Algorithm Hash digest
SHA256 95d7f2d4f7554108033fceb38fb786289134311872c820a08231c43ee6b15540
MD5 a528c7757b7a405e06d3c588de729653
BLAKE2b-256 f993668c577bc49559a44b7e782dda26b7cc5b695876b8009f5d1429c141b7ad

See more details on using hashes here.

File details

Details for the file mcwrapper-1.38-py3-none-any.whl.

File metadata

  • Download URL: mcwrapper-1.38-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for mcwrapper-1.38-py3-none-any.whl
Algorithm Hash digest
SHA256 3fb1e78c3e604a00785df4ed0ea1e7455a5ccc5b4a4860ea2f215a923854fee6
MD5 1de24dc37d5a14d10836732f80e8514c
BLAKE2b-256 32b05f2389713324a596e76e55f8e2350f87468445e0cc857b0a0785bf18b377

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