dathost api的python包装器

dathostpython的Python项目详细描述


https://img.shields.io/github/issues/pbexe/dathost-python.svghttps://badge.fury.io/py/dathostpython.svghttps://img.shields.io/pypi/dm/dathostpython.svg

这是dathost api的python包装器。

安装

pip3installdathostpython

基本用法

fromdathostpython.wrapperimportdathostdathost=dathost("email","password")# List servers and all their detailsprint(dathost.servers())# Start a serverdathost.start("server id")# Stop a serverdathost.stop("server id")# Duplicate a serverdathost.duplicate("server id")# Duplicate a server and print its idprint(dathost.duplicate("server id")["id"])# Delete a serverdathost.delete("server id")# Retrieve a file from the serverdathost.getFile("server id","path/to/file.txt")# Retrieve info on a serverprint(dathost.info("server id"))# Edit a server value# Multiple values can be passed, for example:# dathost.edit("570e1dadcde5f5xxxxxxxxxx", csgo_settings__rcon = "Bob", name = "Bob")## Note:# For parameters with "." in them, replace the "." with "__".# A full list of parameters can be found at https://dathost.net/api#!/default/put_game_server_itemdathost.edit("server id",parameter="value")# List files in a directory# The final 2 parameters (Hide default files and show file sizes) are optionaldathost.files("server id","path/to/dir/",True,True)# Sync the files between the local cache and the gameserverdathost.sync("server id")

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

推荐PyPI第三方库


热门话题
hashmap Java如何以列表作为值组织映射   java二进制搜索树如何在“main”中调用我的inoder方法,并在输出中省略null?   java Subclipse如何覆盖更改的文件   java无法识别的VM选项“ExplicitGCInvokesConcurrentAndUnloadsClasses”   java需要从字符串中转义“| |”条件   JavaMVEL迭代列表   如果有对元素字段的引用,java会对元素进行垃圾收集吗?   java如何按索引删除行   java有没有简单的http服务来检查域名的可用性   java Spring@ContextConfiguration无法从不同的项目加载测试上下文   IntelliJ IDEA社区版中的java Webservice客户端   netbeans从java Main调用另一个java文件中的方法   java MySQL左连接和组连接返回重复和中断数据   Java\Hibernate\ManyTone\Ordering   java JPQL中的LIMIT子句是什么?   在Java中,预处理器将单词转换为基本形式   在核心java中创建GUI时的swing问题   java从javabean创建不可变对象   java线程是否可能在wait()循环中饿死?   java有spring用来从xml解析setter数据的助手类吗?