Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/os/slacker
Full-featured Python interface for the Slack API
https://github.com/os/slacker
api python slack
Last synced: 4 months ago
JSON representation
Full-featured Python interface for the Slack API
- Host: GitHub
- URL: https://github.com/os/slacker
- Owner: os
- License: apache-2.0
- Archived: true
- Created: 2014-03-12T15:13:32.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T04:29:17.000Z (over 4 years ago)
- Last Synced: 2024-05-28T12:53:34.824Z (8 months ago)
- Topics: api, python, slack
- Language: Python
- Homepage:
- Size: 260 KB
- Stars: 1,606
- Watchers: 56
- Forks: 246
- Open Issues: 30
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-repositories - os/slacker - Full-featured Python interface for the Slack API (Python)
- awesome-python-again -
- starred-awesome - slacker - Full-featured Python interface for the Slack API (Python)
README
This repository is archived and will not receive any updates
############################################################It's time to say goodbye. I'm archiving Slacker. It's been getting harder to find time to maintain this project for a while now. For years it's been the most popular Python library for Slack. Eventually Slack decided to go with `their library `_, and I lost my motivation to maintain it. Thank you all for your contributions to this project.
=======
Slacker
=======|pypi|_
|build status|_
|pypi downloads|_
|license|_
|gitter chat|_.. image:: https://raw.githubusercontent.com/os/slacker/master/static/slacker.jpg
About
=====Slacker is a full-featured Python interface for the `Slack API
`_.Installation
============.. code-block:: bash
$ pip install slacker
Examples
========
.. code-block:: pythonfrom slacker import Slacker
slack = Slacker('')
# Send a message to #general channel
slack.chat.post_message('#general', 'Hello fellow slackers!')# Get users list
response = slack.users.list()
users = response.body['members']# Upload a file
slack.files.upload('hello.txt')# If you need to proxy the requests
proxy_endpoint = 'http://myproxy:3128'
slack = Slacker('',
http_proxy=proxy_endpoint,
https_proxy=proxy_endpoint)# Advanced: Use `request.Session` for connection pooling (reuse)
from requests.sessions import Session
with Session() as session:
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')Documentation
=============https://api.slack.com/methods
.. |build status| image:: https://img.shields.io/travis/os/slacker.svg
.. _build status: http://travis-ci.org/os/slacker
.. |pypi downloads| image:: https://img.shields.io/pypi/dm/slacker.svg
.. _pypi downloads: https://pypi.org/project/slacker/
.. |pypi| image:: https://img.shields.io/pypi/v/Slacker.svg
.. _pypi: https://pypi.python.org/pypi/slacker/
.. |license| image:: https://img.shields.io/github/license/os/slacker.svg
.. _license: https://pypi.org/project/slacker/
.. |gitter chat| image:: https://badges.gitter.im/Join%20Chat.svg
.. _gitter chat: https://gitter.im/os/slacker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge