This is the unofficial python API for mee6.
This implements the api as per the Mee6 API docs located here: https://github.com/SilBoydens/Mee6-api-docs
This API is asynchronous.
Installation
pip install mee6-py-api
Usage
First, import the package and create the API class. Replace your_guild_id with your guild id.
from mee6_py_api import API
mee6API = API(your_guild_id)
Examples
See the tests folder for some functional examples
Get a leaderboard page
Leaderboards are separated into pages of 100 users. Pages start at 0.
leaderboard_page = await mee6API.levels.get_leaderboard_page(0)
print(leaderboard_page)
Example of what it will return:
:
{'admin': False,
'banner_url': None,
'guild': {'icon': 'd25eb4a577ab711df2e20b6b15158561',
'id': '446075987680165888',
'name': 'Helios Protocol',
'premium': False},
'page': 0,
'player': None,
'players': [
{'avatar': 'e23737d84c718554c7894e2d3a827051',
'detailed_xp': [1230, 1255, 7005],
'discriminator': '9597',
'guild_id': '446075987680165888',
'id': '300302688346832897',
'level': 11,
'message_count': 350,
'username': 'johnny',
'xp': 7005},
{'avatar': 'e7ec097ad84062ce77211b3393910d62',
'detailed_xp': [832, 1255, 6607],
'discriminator': '0098',
'guild_id': '446075987680165888',
'id': '450024877710245889',
'level': 11,
'message_count': 330,
'username': 'timmy',
'xp': 6607},
...
],
'role_rewards': [{'rank': 10,
'role': {'color': 6323595,
'hoist': False,
'id': '456256644905697283',
'managed': False,
'mentionable': False,
'name': 'Active Community Member',
'permissions': 104189505,
'position': 14}},
{'rank': 17,
'role': {'color': 14051342,
'hoist': True,
'id': '456256766921932802',
'managed': False,
'mentionable': False,
'name': 'Superstar',
'permissions': 104189505,
'position': 18}}],
'user_guild_settings': None,
'xp_per_message': [15, 25],
'xp_rate': 1.0}
Get mee6 details of a user
Replace user_id with your user id.
details = await mee6API.levels.get_user_details(user_id)
print(details)
Example of what it will return:
:
{'avatar': 'e7ec097ad84062ce77211b3393910d62',
'detailed_xp': [832, 1255, 6607],
'discriminator': '0098',
'guild_id': '446075987680165888',
'id': '450024877710245889',
'level': 11,
'message_count': 330,
'username': 'timmy',
'xp': 6607},
Get xp of a user
Replace user_id with your user id.
xp = await mee6API.levels.get_user_xp(user_id)
print(xp)
Example of what it will return:
42
Get the level of a user
Replace user_id with your user id.
level = await mee6API.levels.get_user_level(user_id)
print(level)
Example of what it will return:
5
Metadata
Release files for mee6-py-api 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mee6_py_api-0.0.1.tar.gz | 5.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mee6_py_api-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.3 kB
Release files / mee6_py_api-0.0.1.tar.gz
| Download URL | mee6_py_api-0.0.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c2b5f9b310756edf3549792c99c4dc5489c0f02fca806cf13b9492c46590a68
|
|
BLAKE2b-256 checksum How to use checksums |
78f3e63b1c748aca2dbb72eddfaab4e5e17c37c585db9c9ed3e58f7d597bc7a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
|
Release files / mee6_py_api-0.0.1-py3-none-any.whl
| Download URL | mee6_py_api-0.0.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef7f6faa847159e9936b30ee85bbc9ec3a8702d8e05e125e92ddd99a7aca8c94
|
|
BLAKE2b-256 checksum How to use checksums |
465b179af0d1ae35f9e58151bbd90b6b5b84f768fc21a99954c5b10ad0a293d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
|
Security for mee6-py-api 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.