pw python包装器是一个小的python模块,用于连接jilk.pw的公共api。如果您想将您的不和谐服务器中的项目嵌入到与Python绑定的任何东西中,这将是有帮助的。

jilkpw-p的Python项目详细描述


jilk.pw python包装器

概述

关于

jilkpw_py是一个小的python模块,用于连接到Jilk.pw的公共api。如果您希望将来自discord服务器的项嵌入到任何与python绑定的内容中,这会有所帮助。

什么是jilk.pw

jilk.pw是一个不和谐服务器列表,帮助您发现顶级的不和谐服务器;与可怕的公共不和谐服务器列表!

文档

安装

要安装jilkpw_py,请在终端中输入以下命令:

pip3 install jilkpw_py

请注意,在某些系统上,python3可能只绑定到pip&;而不是pip3

使用

要使用jilkpw_py,请打开您的首选ide/text编辑器并输入以下内容:

获取特定列表
fromjilkpw_pyimportJilkpwWrapper# Import the classwrapper_name_here=JilkpwWrapper()# Initating an object under `jilkpw_py`dict_output=wrapper_name_here.find(478363034990149634)# Returns a dict for the given guild_id or throws an exeptionprint(dict_output)# Print the output to screen

获取所有列表
fromjilkpw_pyimportJilkpwWrapper# Import the classwrapper_name_here=JilkpwWrapper()# Initating an object under `jilkpw_py`dict_output=wrapper_name_here.all()# Returns a dict of all servers on jilkpw or throws an exeptionprint(dict_output)# Print the output to screen

注意

这将给出jilkpw_py的基本实现,但是正如您在下面看到的,您必须捕获各种错误(提示:在dict_output = wrapper_name_here.find(478363034990149634)行周围尝试/排除)。

异常

http错误

  • NotFound:jilk.pw找不到您传入的公会ID
  • BadRequest:对jilk.pw的请求处理不正确&已中止
  • NotAuthed:无论出于什么原因,您都无权使用jilk.pw的公共api
  • WebMoved:jilk.pw移动了
  • WebTimeout:请求jilk.pw超时,请稍后再试
  • UriTooLong:uri太长,服务器无法处理
  • MiscError:http响应代码是x(不包括200或以前使用过的)

其他错误

  • CannotMain:如果您试图直接运行模块

scowez,2019年在apache下获得许可

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

推荐PyPI第三方库


热门话题
java Requestcontextholder在spring 4中具有并发访问权限。IBMWebSphere上的x Web应用程序?   java如何下载、设置和使用Eclipse?   java如何组合这些mysql语句   java JDBC无法连接到openshift上的mysql数据库   如果存在允许正确处理的重载,java对于方便的方法来说是否可行?   使用hibernate序列的java Spring MVC不存在   具有路径的java Selenium ChromeDriver负载扩展问题   读一本书。java中的java文件   退出队列时,Java队列程序结果为空   Java lambda返回带有重复代码问题的列表   java使用意图从其他活动传递数据并在listview中显示   java如何在java中创建JSON输出   java Android:在不破坏或暂停活动的情况下关闭显示   支持Android电视和手机的java多apk   关于Java应用程序测试和调试的一组问题   如何在JavaSE中使用jdbcRealmShiro进行授权   在java中是否有一个无异常检查的URL解析实用程序?   当页面上有多个相同类型的元素时,java会选择一个特定的元素   递归需要帮助发现java代码中的缺陷