Skip to main content

An async Python wrapper for the MCTiers API

Project description

mctiers

An async Python wrapper for the MCTiers API.

The library is built with an aiohttp HTTP layer and a higher-level client that returns Python model objects.

Installing

python -m pip install mctiers

To install the local project while developing:

python -m pip install -e .

Quick Example

import asyncio

import mctiers


async def main() -> None:
    async with mctiers.Client() as client:
        profile = await client.fetch_player_profile_by_name(
            "ItzRealMe",
            badges=True,
            tests=True
        )

        print(profile.name)
        print(profile.points)


asyncio.run(main())

Proxy Support

client = mctiers.Client(
    proxy_url="http://127.0.0.1:8080"
)

proxy_auth accepts aiohttp.BasicAuth.

Requirements

  • Python 3.9+
  • aiohttp

License

MIT

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

mctiers-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

mctiers-0.1.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file mctiers-0.1.0.tar.gz.

File metadata

  • Download URL: mctiers-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for mctiers-0.1.0.tar.gz
Algorithm Hash digest
SHA256 698d6b5b126ffd4739ac919165d97b668a010bb1c3f695dcc1a546328c453d09
MD5 287ebdc04ca2610037f629783d2ccfd8
BLAKE2b-256 e143c561c02226a16513eb1e71ea737b233faa72a85c0de37dbc565c8253e6d5

See more details on using hashes here.

File details

Details for the file mctiers-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mctiers-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for mctiers-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90020097bf2d27883def16e521d8bad7aa932d8ce63014b1f161800233c64b45
MD5 1c2ce9f074b9c7a61e8d4e363bc6bf90
BLAKE2b-256 3376c91ec01905f191c0218e2431b8d809e7d86aff227549926a9174c726ccb0

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