使用challonge api的python库

achallonge的Python项目详细描述


achallonge

python 3.5+的异步challonge

Build StatusDocumentation StatusCoverage Status

不仅仅是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]

用法

importchallongeasyncdeffoo():# Log in into Challonge with your CHALLONGE! API credentials (https://challonge.com/settings/developer).user=awaitchallonge.get_user('your_challonge_username','your_api_key')# Retrieve your tournamentstournaments=awaituser.get_tournaments()# Tournaments, matches, and participants are all represented as Python classesfortintournaments:print(t.id)# 3272print(t.name)# 'My Awesome Tournament'print(t.status)# 'open'# Retrieve the participants for a given tournament.participants=awaittournaments[0].get_participants()print(len(participants))# 13

文档

完整的文档可以在Read the docs

作者/许可证

在麻省理工学院许可下发行。有关详细信息,请参见LICENSE

Fabien Poupenau(FP12)-2017-2019年

推特:@fp12gaming

加入Discord Server并讨论这个库!

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
JavaCenter是JavaFX2中不可执行的窗格   java Docker将容器连接到本地数据库   java无法通过Spring从Redis获得正确的值   java为什么要将数组转换为列表再转换为数组   Java泛型在方法中放入字符串或整数参数   在Cloud Bigtable SDK中找不到java类   java Mavensiteplugin无法加载生成的源(Jaxb)   java GWT序列化和Appengine通道Api   PrintWriter out=new PrintWriter(sWriter)和PrintWriter out=response之间的java差异。getWriter()   空手道DSL中的javascript,在java参数调用中传递变量时如何转义单引号   windows 64位java可以与32位tomcat一起使用   为for循环| Java输入参数   java您可以更改SWT选项卡项的背景和/或前景颜色吗?   用java生成6位pin码   java如何从另一个通量中排除通量中的所有元素   java无法调用“javafx.scene.control.ComboBox.getItems()”,因为“Controller.getMyBox()”的返回值为null   将Java字符串与数组匹配时出现问题   java如何使用HttpsUrlConnection对SSL连接使用代理身份验证?   java如何检查XML元素是否包含CDATA?