Skip to main content

Opinionated, testable Python wrappers for Slack’s Web, Admin, and SCIM APIs, organized by object domain (users, conversations, messages, files, workspaces, and IdP groups). Designed for automation and administration workflows.

Project description

slack-objects

A focused Python package for working with Slack objects commonly used in administration and automation workflows.

slack-objects provides opinionated, testable wrappers around the Slack Web API, Admin API, and SCIM API—favoring object-based access over raw endpoint calls.


Supported Slack Objects

The following Slack object types are supported:

  • Users
  • Conversations (e.g, channels)
  • Messages
  • Files
  • Workspaces
  • IDP Groups (SCIM - e.g., Okta groups)

Overview

slack-objects is designed for:

  • Slack administration automation
  • Identity and access management (IAM) workflows
  • Internal tooling and bots
  • Auditing and cleanup scripts

This package is not a replacement for slack_sdk. Instead, it focuses on higher-level object operations that typically require:

  • multiple API calls
  • pagination
  • rate limiting
  • Admin API or SCIM usage
  • non-trivial orchestration logic

Design Highlights

Factory-based API

All object helpers are created from a single entry point:

from slack_objects.client import SlackObjectsClient

slack = SlackObjectsClient(cfg)

users = slack.users()
alice = slack.users("U123")

conversations = slack.conversations()
general = slack.conversations("C123")

This avoids global state while keeping usage concise and consistent.


Explicit token model

Slack APIs have different authorization requirements. This package keeps tokens explicit and separate:

Token Used for
bot_token Slack Web API (most read/write operations)
user_token Slack Admin API
scim_token Slack SCIM API (IdP / provisioning)

Tokens are optional in configuration, but required by methods that need them. Errors are raised at call time with clear messages.


Strict method boundaries

Each object follows a consistent internal structure:

public method
    → wrapper method
        → SlackApiCaller / SCIM request

Keyword-only APIs

Methods with multiple optional parameters use keyword-only arguments to avoid ambiguity and future breaking changes.


Testability

The codebase is designed to be tested without hitting Slack.


Installation

pip install slack-objects

Configuration

from slack_objects.config import SlackObjectsConfig, RateTier

cfg = SlackObjectsConfig(
    bot_token="xoxb-...",
    user_token="xoxp-...",
    scim_token="xoxp-...",
    default_rate_tier=RateTier.TIER_3,
)

Testing

Run all smoke tests:

python -m tests.run_all_smoke

Notes

  • SCIM v1 is the default; v2 is supported where applicable
  • Guest expiration dates use PC_Utils.Datetime if installed
  • This package is intended for automation and administration workflows

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

slack_objects-0.0.2.dev0.tar.gz (41.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slack_objects-0.0.2.dev0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file slack_objects-0.0.2.dev0.tar.gz.

File metadata

  • Download URL: slack_objects-0.0.2.dev0.tar.gz
  • Upload date:
  • Size: 41.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for slack_objects-0.0.2.dev0.tar.gz
Algorithm Hash digest
SHA256 9d9e5c2524819a6f1965dcd345e8a78e58ebb8a7b3b32998ccc8bfae1148aebb
MD5 ac47237cb6b0de59dbf1eeb8336a90d7
BLAKE2b-256 d780c8769860aec520f2e0f3f3b98a92df5dc0a0992cd3bdd48e47b921c223f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for slack_objects-0.0.2.dev0.tar.gz:

Publisher: publish-pypi.yml on mmercad0/slack-objects

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file slack_objects-0.0.2.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for slack_objects-0.0.2.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bb5e289e1b541b827c5cc6e2cf065c8324753edd63b3d37a9f111e6911af443
MD5 b2c4a528e5ad2cb172220c9f5d9b4a17
BLAKE2b-256 c14005cec6b8d81d05ea5c9e19660313eafdac6c8c6214795beabca3b4203c1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for slack_objects-0.0.2.dev0-py3-none-any.whl:

Publisher: publish-pypi.yml on mmercad0/slack-objects

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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