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.Datetimeif installed - This package is intended for automation and administration workflows
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slack_objects-0.0.post34.tar.gz.
File metadata
- Download URL: slack_objects-0.0.post34.tar.gz
- Upload date:
- Size: 115.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
820135ace2a1e39b323027123814c4e1433b8e38eb163694ac65f3f7d291e4f9
|
|
| MD5 |
d4560306a0ec0f51a15d1691655d26b2
|
|
| BLAKE2b-256 |
d959d9f65708306c88ee5ec979f9bd33f74fcf61c91a707151003692bf723015
|
File details
Details for the file slack_objects-0.0.post34-py3-none-any.whl.
File metadata
- Download URL: slack_objects-0.0.post34-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32096d0befd5efbea01e311b22536201c99b06178b9a52a248d6db2843980f65
|
|
| MD5 |
56e07588f611cf1fa5ac3e92c63e5449
|
|
| BLAKE2b-256 |
db3f6f081c872a4e1ac134dd90fe42c2575ecf343e3e2557a3e0e561b4bb80dd
|