Skip to main content

A small library to simplify slack web API calls

Project description

Introduction

NOTE: This is an alpha version. Expect bugs and expect everything to change.

slackutils is a small library for simplifying some tasks with the Slack Web API. It is an extension of slackclient, and mostly contains methods for looking up users or channels by other parameters than their ID.

Installation

Recommended method is to install using pip. Note that we're still in alpha:

pip install --upgrade slackutils

Usage

Authenication

You need a slack token to use this library. slackutils looks for the token using one of two alternatives:

  1. All methods support a named parameter SLACK_API_TOKEN which is used to authenticate.
  2. If no named parameter is found, slackutils will look for the environment variable SLACK_API_TOKEN.

If neither of the above variables exist, an error will be raised.

Examples

Simplify looking up users and channels by other parameters than their ID

import slackutils
marketing_channel = slackutils.conversations.get(name='marketing')

from slackutils import get_user
dave = get_user(email='dave@example.com')

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

slackutils-0.0.4.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

slackutils-0.0.4-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file slackutils-0.0.4.tar.gz.

File metadata

  • Download URL: slackutils-0.0.4.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

File hashes

Hashes for slackutils-0.0.4.tar.gz
Algorithm Hash digest
SHA256 70c4382d90dfb9aa50c17a74a4c3c8288eca2f6235462f2d5137f1458e8e3e4e
MD5 d0dfbf2b50b0c52748314b8672ff083d
BLAKE2b-256 40fd924aade0b1d97b062aac152677ff05bc7500d71eccd1deaa01d48e7c7f60

See more details on using hashes here.

File details

Details for the file slackutils-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: slackutils-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

File hashes

Hashes for slackutils-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5d90e5a8c571713376d79ed5539d702ab9b5ddb11bd4a05efa1051fba0ba98fa
MD5 22b36bc6a3e8e30072d974ab7089276d
BLAKE2b-256 6afab61db899dd491cf30a55e9b5a7d4271c9e9dae9b33827c2bbc1c8f9a283d

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