mojang.minecraft.launchermeta

class mojang.minecraft.launchermeta.VersionMeta(id, type, url, time, release_time)

Bases: NamedTuple

id: str

Alias for field number 0

release_time: datetime

Alias for field number 4

time: datetime

Alias for field number 3

type: str

Alias for field number 1

url: str

Alias for field number 2

mojang.minecraft.launchermeta.get_version(version: str = 'latest', snapshot: bool = False) VersionMeta | None

Returns information about a specific version

Parameters:
  • version (str) – The version you want to retrieve (default: ‘latest’)

  • snapshot (bool) – If True include latest snapshot. Only used when version is set to ‘latest’

Example:

>>> from mojang.minecraft import launchermeta
>>> launchermeta.get_version("1.18.1")
VersionMeta(
    id='1.18.2',
    type='release',
    url='https://launchermeta.mojang.com/v1/packages/86f9645f8398ec902cd17769058851e6fead68cf/1.18.2.json',
    time=datetime.datetime(2022, 2, 28, 10, 48, 16, tzinfo=datetime.timezone.utc),
    release_time=datetime.datetime(2022, 2, 28, 10, 42, 45, tzinfo=datetime.timezone.utc)
)
mojang.minecraft.launchermeta.get_versions()

Returns a list of all the available versions

Example:

>>> from mojang.minecraft import launchermeta
>>> launchermeta.get_versions()
(['22w18a', '22w17a', '22w16b', ..., 'rd-20090515', 'rd-132328', 'rd-132211'], '1.18.2', '22w18a')