urbanpython是城市字典JSON API的API包装器
urbanpython的Python项目详细描述
乌班Python
urbanpython是城市字典JSON API的API包装器
安装
要安装urbanpy,请执行以下操作:
pip install urbanpython
或者
python -m pip install urbanpython
文件
此自述文件是文档
示例
要获取API密钥,请转到https://rapidapi.com/community/api/urban-dictionary/endpoints并获取API密钥
importurbanpythonurban=urbanpython.Urban("-your api key-")result=urban.search("the thing you are gonna search")print(result.definition)#Definition of the postprint(result.permalink)#The link to the postprint(result.thumbs_up)#Number of thumbs upsprint(result.thumbs_down)#Number of thumbs downsprint(result.sounds_url)#A list of the sounds urls in the postprint(result.author)#The author of the postprint(result.defid)#The ID of the definitionprint(result.written_on)#The time the definition got written onprint(result.example)#The example of the post
- 项目
标签: