Skip to main content

A Python module to interact with the CoralMC API

Project description

CoralMC

About

A Python module that allows you to interact with the CoralMC API.

Warning CoralMC's API is still in alpha and isn't documented. In the future an access token is going to be required. At the current state, it isn't recommended for production usage as it could stop working at any point.

Installation

python -m pip install coralmc

Example usage

Get basic player info:

import coralmc
import asyncio

async def main():
    try:
        playerInfo = await coralmc.getPlayerInfo("Feryzz")
        if playerInfo:
            print(playerInfo)
        else:
            print("Player not found!")
    except Exception as error:
        print(f"Error: {error}")

asyncio.run(main())

Get player stats:

import coralmc
import asyncio

async def main():
    try:
        playerStats = await coralmc.getPlayerStats("Feryzz")
        if playerStats:
            print(playerStats["kitpvp"])
            print(playerStats["bedwars"])
        else:
            print("Player not found!")
    except Exception as error:
        print(f"Error: {error}")

asyncio.run(main())

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

coralmc-1.0.1.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

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

coralmc-1.0.1-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file coralmc-1.0.1.tar.gz.

File metadata

  • Download URL: coralmc-1.0.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for coralmc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 96b24226950446eb37f930e91b9f6c74b28cc315248f622b449917fad4a9f40a
MD5 22d676457828ce814ac7c052203dca3a
BLAKE2b-256 9db7db24fc11b2c75b29b851f03cfc4befa4e74c9136f31311b735cc8fe9901a

See more details on using hashes here.

File details

Details for the file coralmc-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: coralmc-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for coralmc-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bde2236cb37d8ba9cd5aacaaf69bcf9c98f2bd482f767a2e057d391455c8cfa0
MD5 bc3d006abefaa7b1099e7dc131069a64
BLAKE2b-256 c007dc754b32ca3402f8ab34cbc8a8ff1e5819373b3003ee6532b4cf45f1a5ca

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