松弛API客户端

slacker的Python项目详细描述


pypibuild statuspypi downloadslicensegitter chat

https://raw.githubusercontent.com/os/slacker/master/static/slacker.jpg

关于

slacker是Slack API的全功能python接口。

安装

$ pip install slacker

示例

fromslackerimportSlackerslack=Slacker('<your-slack-api-token-goes-here>')# Send a message to #general channelslack.chat.post_message('#general','Hello fellow slackers!')# Get users listresponse=slack.users.list()users=response.body['members']# Upload a fileslack.files.upload('hello.txt')# If you need to proxy the requestsproxy_endpoint='http://myproxy:3128'slack=Slacker('<your-slack-api-token-goes-here>',http_proxy=proxy_endpoint,https_proxy=proxy_endpoint)# Advanced: Use `request.Session` for connection pooling (reuse)fromrequests.sessionsimportSessionwithSession()assession:slack=Slacker(token,session=session)slack.chat.post_message('#general','All these requests')slack.chat.post_message('#general','go through')slack.chat.post_message('#general','a single https connection')

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

推荐PyPI第三方库


热门话题
javajaxb在嵌套节点中生成xmlns:xsi声明   java重定向到youtube以上传jsp上可用的视频   java提高了JVM和ANT的性能   java如何将返回的JSON数据放在HTML表单中   java如何发送XWWWFORMURLENCODE在重新授权   java为什么jvm XX:+EliminateAllocations失败   堆移除和重建方法?(爪哇)   Stanford NPL in Spark(Scala)应用程序运行到Java堆空间(Java.lang.OutOfMemoryError)   调试java中打开/关闭println的任何方式(详细模式)   java IntelliJ在鼠标悬停时显示JavaDocs工具提示   Olingo Odata Java中的自动扩展选项   json将postgres文本arry转换为java列表?   oop需要帮助推断Java代码   复选框的java添加操作侦听器AbstractTableModel   java如何从公共静态void main(String[]args)传递值   java从数据库中获取大值   java Processing 2.0电影从jar运行时无法打开电影文件   java如何在不使用应用程序的情况下刷新活动?   尝试将JSON解析为ListView时的Android:JSON parse:null对象引用