Skip to main content

Python MCC API

A wrapper for the MC Championship API, inspired by derNiklaas's node-mcc-api project.

Installation

Ensure that pip is updated using:

python -m pip install --upgrade pip

Then install or update mcc_api using:

pip install --upgrade mcc-api

Usage

import mcc_api

# Print information about the current event cycle
from datetime import datetime, timezone
event = mcc_api.get_event()
if event.data.date <= datetime.now(tz=timezone.utc):
    print(f"The latest event (MCC {event.data.event}) started at {event.data.date.strftime('%I%p UTC on %A %d %B %Y')}.")
else:
    print(f"The upcoming event (MCC {event.data.event}) starts at {event.data.date.strftime('%I%p UTC on %A %d %B %Y')}.")

# Print the names of the players that played in Dodgebolt in the latest event
rundown = mcc_api.get_rundown()
dodgebolt_teams = rundown.data.dodgeboltData.keys()
players = sorted([player for team in dodgebolt_teams for player in rundown.data.creators[team]], key=str.casefold)
print(f"The players that played in Dodgebolt in the latest event were {', and '.join([', '.join(players[:-1]), players[-1]])}.")

Download files

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

Source Distribution

mcc_api-1.0.3.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

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

mcc_api-1.0.3-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file mcc_api-1.0.3.tar.gz.

File metadata

  • Download URL: mcc_api-1.0.3.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for mcc_api-1.0.3.tar.gz
Algorithm Hash digest
SHA256 6c20260df159b2faea5f5ee0aa5e40ea6f1e1bf47c61498e166d3cf54c04d642
MD5 fa529b752e109b4f440814fe8acf8344
BLAKE2b-256 1e0386e7807ed6b20408186dfd9251911250b0e19626ec1917ecc4f038f91373

See more details on using hashes here.

File details

Details for the file mcc_api-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: mcc_api-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for mcc_api-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f927fc9e42b0c42d3c3ebb60a7bf4841e5de2a3c92427f95b8dec804df7cb506
MD5 2bf7ba9de310f23ec99c1d44aee22720
BLAKE2b-256 4556508f3ae8f130c8dc40d82df9e21b3af11b191c7da46b2b3fd02ff904dea5

See more details on using hashes here.

Release history Release notifications | RSS feed

1.4.5

2 files

1.4.4

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.8

2 files

1.1.7

2 files

1.1.6

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

This release

1.0.3 This release

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

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