Skip to main content

Slack API client, fork of slacker

Project description

pypi build status pypi downloads license

About

SlackerToo is a fork and continuation of Slacker library, a full-featured Python interface for the Slack API.

Installation

$ pip install slacker2

Examples

from slacker2 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')

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

slacker2-22.8.4.tar.gz (10.5 kB view details)

Uploaded Source

File details

Details for the file slacker2-22.8.4.tar.gz.

File metadata

  • Download URL: slacker2-22.8.4.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for slacker2-22.8.4.tar.gz
Algorithm Hash digest
SHA256 7348e0c923002c72aea1286e6710da3274acc6d445bc929d84ab790ec4cb2b3a
MD5 845f18ada2d429482e60f3a63762412e
BLAKE2b-256 ffe49e2bc02ea852d7c3d3c0318ece90db07dd57d03b4ec92a912e9447d881bc

See more details on using hashes here.

Supported by

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