Skip to main content

About

PyPI version PyPI - Python Version

Read the Docs MIT License PyPI - Downloads

Documentation

Mojang is a Python package for accessing Mojang's services. It serves as a simple wrapper around Mojang's API and can be used to get name drop dates, convert UUIDs, and much more. It does not, however, currently support authentication or login features.

Installation

Python 3.6 or higher is required.

To install the library, you can just run the following console command:

python -m pip install mojang

Quickstart

import time
from mojang import MojangAPI

uuid = MojangAPI.get_uuid("Notch")

if not uuid:
    print("Notch does not exist.")
else:
    print("Notch's UUID is", uuid)
    profile = MojangAPI.get_profile(uuid)
    print("Notch's skin URL is", profile.skin_url)

servers = MojangAPI.get_blocked_servers()
print(f"There are {len(servers)} blocked servers on Minecraft.")

drop_timestamp = MojangAPI.get_drop_timestamp("Notch")

if not drop_timestamp:
    print("Notch is not dropping")
else:
    seconds = drop_timestamp - time.time()
    print(f"Notch drops in {seconds} seconds")

To see a complete list of methods, read the documentation.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mojang-0.1.9.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

mojang-0.1.9-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file mojang-0.1.9.tar.gz.

File metadata

  • Download URL: mojang-0.1.9.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for mojang-0.1.9.tar.gz
Algorithm Hash digest
SHA256 67505b6138567ed0d1ce81679f13f705f16bdb70558a7f7ffefe9fd2d1859507
MD5 00f8673eef0ce52389c93c8b96b01519
BLAKE2b-256 a209d7f1e6cf5ba2edc3bdf540ffbf3b25c0d52c8b697e07cd7df39fede15254

See more details on using hashes here.

File details

Details for the file mojang-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: mojang-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for mojang-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2db02760b970baf581f5e024f82a287dfb8e3d8978734816fb9c60cdf1ceb0a5
MD5 0dfb3d7cdd8f8a7eb7a04e1a1cf6851b
BLAKE2b-256 3358bb62e5bdf1a080b056ee28da149646bb393e0ba507665ccb01d7602c9d54

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.0

2 files

1.0.2

2 files

1.0.1

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

This release

0.1.9 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page