Skip to main content

Slack API client

Project description

pypi build status pypi downloads license gitter chat

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

About

Slacker is a full-featured Python interface for the Slack API.

Examples

from slacker import Slacker

slack = Slacker('<your-slack-api-token-goes-here>')

# 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('<your-slack-api-token-goes-here>',
                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')

Installation

$ pip install slacker

Documentation

https://api.slack.com/methods

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slacker-0.12.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

slacker-0.12.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file slacker-0.12.0.tar.gz.

File metadata

  • Download URL: slacker-0.12.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for slacker-0.12.0.tar.gz
Algorithm Hash digest
SHA256 7771d4edd2bf651f849b9ca84e54a9d343de4fd7a87fa8d31b872407441a4812
MD5 998d753699e20984d55fd738de90ba08
BLAKE2b-256 a97aad13ee89fe30ac69461ee7a3dee0882b493c8ce59b68a489948b50ac0403

See more details on using hashes here.

File details

Details for the file slacker-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: slacker-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for slacker-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41ee24d0f28612542f9239b08d9936d0dee661d2a14e83d741037cb15fdf4ff4
MD5 1f650b7e99221b36cb6d2703f2ad8696
BLAKE2b-256 41c5006794554034d01c7821171a5f2fe3b233f3261d7af76abbfdb0d69f1ce8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page