使用 Chalonge API 的 python 库
项目描述
阿查朗日
Python 3.5+ 的异步挑战
现代库不仅仅是 Challonge Web API 的包装器
要求
aiohttp
可选的:
cchardet
更快地替换 chardet,如 aiohttp 页面上所述aiodns
用于加速 DNS 解析,aiohttp 强烈推荐
Python 版本支持
3.5
3.6
3.7
安装
pip install achallonge
如果你想拥有 aiohttp 的可选依赖项,你可以:
pip install achallonge[speed]
用法
import challonge
async def foo():
# Log in into Challonge with your CHALLONGE! API credentials (https://challonge.com/settings/developer).
user = await challonge.get_user('your_challonge_username', 'your_api_key')
# Retrieve your tournaments
tournaments = await user.get_tournaments()
# Tournaments, matches, and participants are all represented as Python classes
for t in tournaments:
print(t.id) # 3272
print(t.name) # 'My Awesome Tournament'
print(t.status) # 'open'
# Retrieve the participants for a given tournament.
participants = await tournaments[0].get_participants()
print(len(participants)) # 13
文档
完整的文档可以在阅读文档中找到
作者/许可证
在 MIT 许可下分发。详情见LICENSE
_
Fabien Poupineau (fp12) - 2017-2019
推特:@fp12gaming
加入Discord 服务器并讨论这个库!
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
achallonge-1.9.0.tar.gz
(15.7 kB
查看哈希)
内置分布
achallonge-1.9.0-py3-none-any.whl
(19.3 kB
查看哈希)
关
achallonge -1.9.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 2f1792acb1cc3fa8b67229eed3ca4a58f378d62bcd47e2715843c24c4a078be7 |
|
MD5 | 27214ac437d52a793fa6fd07151fba9b |
|
布莱克2-256 | 641212ce38e0d48952bb324147ea4c90f40cbb8766009f04287165dd3c69023d |
关
achallonge -1.9.0-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | aa9ec307cc1ed5c4b3a67af99c633107731b60d5405c45b2cbd93bc28ec8c2f3 |
|
MD5 | 8846be4268af28b7fa780801ec12850c |
|
布莱克2-256 | 5bd602ead7db7f267cfd25e9930c04e9934958a7e84b07df89bcce6c460fe979 |