Releases: slackapi/python-slack-sdk
v3.39.0
What's Changed
🚀 Enhancements
- feat: Add work objects support by @vegeris in #1783 and #1793
- feat(web-api): add slackLists methods by @srtaalej in #1772
- feat: add table block by @codomposer in #1788
📦 Other changes
- fix: improve the release instructions by @WilliamBergamin in #1792
- chore: Add .github/CODEOWNERS file by @mwbrooks in #1791
- chore(release): version 3.39.0 by @vegeris in #1795
New Contributors
Full Changelog: v3.38.0...v3.39.0
Milestone: https://github.com/slackapi/python-slack-sdk/milestone/114?closed=1
v3.38.0
What's Changed
🚀 Enhancements
- feat(models): add underline to rich text section block element by @zimeg in #1771
- feat: support python 3.14 by @WilliamBergamin in #1784
- use filename for uploaded files by @codomposer in #1774
🐛 Bug Fixes
- fix: remove unused mypy ignore type comments by @zimeg in #1769
- docs(oauth): use a variable "base_dir" home path for file stores by @zimeg in #1760
📚 Documentation
- docs: corrects typo in reference url on landing page by @lukegalbraithrussell in #1779
- docs: link to context actions block and related reference by @zimeg in #1789
📦 Other changes
- ci: send regression notifications if prior jobs do not succeed on schedule by @zimeg in #1768
- chore(deps): bump actions/stale from 10.0.0 to 10.1.0 by @dependabot[bot] in #1776
- chore(deps): bump black from 22.10.0 to 23.3.0 by @dependabot[bot] in #1775
- fix: dependabot config to ignore
blackby @WilliamBergamin in #1778 - chore: automate release process by @WilliamBergamin in #1781
- chore: add a formatter script for maintainers by @WilliamBergamin in #1785
- ci: upload test results using the recommended codecov action by @zimeg in #1787
- chore(release): version 3.38.0 by @WilliamBergamin in #1790
New Contributors
- @codomposer made their first contribution in #1774
Full Changelog: v3.37.0...v3.38.0
Milestone: https://github.com/slackapi/python-slack-sdk/milestone/113?closed=1
v3.37.0
AI-Enabled Features: Loading States, Text Streaming, and Feedback Buttons
🍿 Preview
2025-10-06-loading-state-text-streaming-feedback.mov
📚 Changelog
⚡ Getting Started
Try the AI Agent Sample app to explore the AI-enabled features and existing Assistant helper:
# Create a new AI Agent app
$ slack create slack-ai-agent-app --template slack-samples/bolt-python-assistant-template
$ cd slack-ai-agent-app/
# Initialize Python Virtual Environment
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt
# Add your OPENAI_API_KEY
$ export OPENAI_API_KEY=sk-proj-ahM...
# Run the local dev server
$ slack runAfter the app starts, send a message to the "slack-ai-agent-app" bot for a unique response.
⌛ Loading States
Loading states allows you to not only set the status (e.g. "My app is typing...") but also sprinkle some personality by cycling through a collection of loading messages:
@app.message()
def handle_message(message, client):
client.assistant_threads_setStatus(
channel_id=channel_id,
thread_ts=thread_ts,
status="thinking...",
loading_messages=[
"Teaching the hamsters to type faster…",
"Untangling the internet cables…",
"Consulting the office goldfish…",
"Polishing up the response just for you…",
"Convincing the AI to stop overthinking…",
],
)
# Start a new message stream🔮 Text Streaming Helper
The chat_stream() helper utility can be used to streamline calling the 3 text streaming methods:
# Start a new message stream
streamer = client.chat_stream(
channel=channel_id,
recipient_team_id=team_id,
recipient_user_id=user_id,
thread_ts=thread_ts,
)
# Loop over OpenAI response stream
# https://platform.openai.com/docs/api-reference/responses/create
for event in returned_message:
if event.type == "response.output_text.delta":
streamer.append(markdown_text=f"{event.delta}")
else:
continue
feedback_block = create_feedback_block()
streamer.stop(blocks=feedback_block)🔠 Text Streaming Methods
Alternative to the Text Streaming Helper is to call the individual methods.
1) client.chat_startStream
First, start a chat text stream to stream a response to any message:
@app.message()
def handle_message(client, context, event, messsage):
# Start a new message stream
stream_response = client.chat_startStream(
channel=channel_id,
recipient_team_id=team_id,
recipient_user_id=user_id,
thread_ts=thread_ts,
)
stream_ts = stream_response["ts"]2) client.chat_appendStream
After starting a chat text stream, you can then append text to it in chunks (often from your favourite LLM SDK) to convey a streaming effect:
for event in returned_message:
if event.type == "response.output_text.delta":
client.chat_appendStream(
channel=channel_id,
ts=stream_ts,
markdown_text=f"{event.delta}"
)
else:
continue3) client.chat_stopStream
Lastly, you can stop the chat text stream to finalize your message:
client.chat_stopStream(
channel=channel_id,
ts=stream_ts,
blocks=feedback_block
)👍🏻 Feedback Buttons
Add feedback buttons to the bottom of a message, after stopping a text stream, to gather user feedback:
def create_feedback_block() -> List[Block]:
blocks: List[Block] = [
ContextActionsBlock(
elements=[
FeedbackButtonsElement(
action_id="feedback",
positive_button=FeedbackButtonObject(
text="Good Response",
accessibility_label="Submit positive feedback on this response",
value="good-feedback",
),
negative_button=FeedbackButtonObject(
text="Bad Response",
accessibility_label="Submit negative feedback on this response",
value="bad-feedback",
),
)
]
)
]
return blocks
@app.message()
def handle_message(client, context, event, message):
# ... previous streaming code ...
# Stop the stream and add feedback buttons
feedback_block = create_feedback_block()
client.chat_stopStream(
channel=channel_id,
ts=stream_ts,
blocks=feedback_block
)- https://docs.slack.dev/reference/block-kit/blocks/context-actions-block/
- https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element/
- https://docs.slack.dev/reference/block-kit/block-elements/icon-button-element/
Ⓜ️ Markdown Text Support
chat_postMessage supports markdown_text
response = client.chat_postMessage(
channel="C111",
markdown_text=markdown_content,
)Learn more in #1718
🧩 Markdown Block
📚 https://docs.slack.dev/reference/block-kit/blocks/markdown-block/
from slack_sdk.models.blocks import MarkdownBlock
...
@app.message("hello")
def message_hello(say):
say(
blocks=[
MarkdownBlock(text="**lets's go!**"),
],
text="let's go!",
)Learn more in #1748
🎞️ Workflows Featured Methods
Add support for the workflows.featured.{add|list|remove|set} methods:
- https://docs.slack.dev/reference/methods/workflows.featured.add
- https://docs.slack.dev/reference/methods/workflows.featured.list
- https://docs.slack.dev/reference/methods/workflows.featured.remove
- https://docs.slack.dev/reference/methods/workflows.featured.set
app.client.workflows_featured_add(channel_id="C0123456789", trigger_ids=["Ft0123456789"])
app.client.workflows_featured_list(channel_ids="C0123456789")
app.client.workflows_featured_remove(channel_id="C0123456789", trigger_ids=["Ft0123456789"])
app.client.workflows_featured_set(channel_id="C0123456789", trigger_ids=["Ft0123456789"])Learn more in #1712
What's Changed
👾 Enhancements
- feat(web): add workflows.featured.{add|list|remove|set} methods in #1712 - Thanks @zimeg!
- feat: support markdown_text parameter in #1718 - Thanks @WilliamBergamin!
- feat(models): add markdown block in #1748 - Thanks @zimeg!
- feat: add ai-enabled features text streaming methods, feedback blocks, and loading state in #1766 - Thanks @zimeg!
🐛 Bug fixes
- Make team_id optional for admin_users_list in #1725 - Thanks @hello-ashleyintech!
📚 Documentation
- Fix python package name in installation guide in #1719 - Thanks @daviesian!
- docs: replace links from api.slack.com to docs.slack.dev redirects in #1763 - Thanks @zimeg!
🤖 Dependencies
- chore(deps): bump on-headers and compression in /docs in #1710 - Thanks @dependabot[bot]!
- chore(deps): bump docutils from 0.21.2 to 0.22 in #1721 - Thanks @dependabot[bot]!
- chore(deps): update pytest-asyncio requirement from <1 to <2 in #1722 - Thanks @dependabot[bot]!
- chore(deps): bump the react group in /docs with 2 updates in #1723 - Thanks @dependabot[bot]!
- chore(deps): bump actions/checkout from 4.2.2 to 5.0.0 in #1734 - Thanks @dependabot[bot]!
- chore(deps): bump codecov/codecov-action from 5.4.3 to 5.5.0 in #1733 - Thanks @dependabot[bot]!
- chore(deps): bump actions/setup-python from 5.6.0 to 6.0.0 in #1737 - Thanks @dependabot[bot]!
- chore(deps): bump actions/stale from 9.1.0 to 10.0.0 in #1738 - Thanks @dependabot[bot]!
- chore(deps): bump codecov/codecov-action from 5.5.0 to 5.5.1 in #1739 - Thanks @dependabot[bot]!
- chore(deps): update pytest-cov requirement from <7,>=2 to >=2,<8 in #1741 - Thanks @dependabot[bot]!
- chore(deps): update mypy requirement from <=1.15.0 to <=1.17.1 in #1740 - Thanks @dependabot[bot]!
- chore(deps): update mypy requirement from <=1.17.1 to <=1.18.2 in #1758 - Thanks @dependabot[bot]!
- chore(deps): bump docutils from 0.22 to 0.22.2 in #1757 - Thanks @dependabot[bot]!
🧰 Maintenance
- Build: remove docusaurus configuration ...
v3.36.0
What's changed
👾 Enhancements
- feat: add support for elevate methods in #1703 - Thanks @WilliamBergamin!
🧪 Tests
- tests: add tests to ensure web client is copyable in #1682 - Thanks @WilliamBergamin!
- chore: remove 3.6 CI support in #1683 - Thanks @WilliamBergamin!
- fix: aiohttp test_init_with_loop broken test in #1697 - Thanks @WilliamBergamin!
📚 Documentation
- docs: reference creating an app with scopes to gather a token for installation in #1694 - Thanks @zimeg!
- Docs: Update old links, apply style guide, and generally copyedit/clean up the Python SDK docs. in #1699 - Thanks @technically-tracy!
🤖 Dependencies
- chore(deps): bump @babel/helpers from 7.26.0 to 7.27.0 in /docs in #1678 - Thanks @dependabot!
- chore(deps): bump @babel/runtime-corejs3 from 7.26.9 to 7.27.0 in /docs in #1679 - Thanks @dependabot!
- chore(deps): bump @babel/runtime from 7.26.0 to 7.27.0 in /docs in #1680 - Thanks @dependabot!
- chore(deps): bump pdoc3 from 0.11.5 to 0.11.6 in #1684 - Thanks @dependabot!
- chore(deps): bump the react group in /docs with 2 updates in #1685 - Thanks @dependabot!
- chore(deps): bump image-size from 1.2.0 to 1.2.1 in /docs in #1686 - Thanks @dependabot!
- chore(deps): bump estree-util-value-to-estree from 3.3.2 to 3.3.3 in /docs in #1687 - Thanks @dependabot!
- chore(deps): bump http-proxy-middleware from 2.0.7 to 2.0.9 in /docs in #1689 - Thanks @dependabot!
- chore(deps): bump the docusaurus group in /docs with 5 updates in #1696 - Thanks @dependabot!
- chore(deps): bump codecov/test-results-action from 1.1.0 to 1.1.1 in #1695 - Thanks @dependabot!
- chore(deps): bump the docusaurus group in /docs with 5 updates in #1705 - Thanks @dependabot!
- chore(deps): bump brace-expansion from 1.1.11 to 1.1.12 in /docs in #1706 - Thanks @dependabot!
🧰 Maintenance
- health: publish test results to code cov in #1677 - Thanks @WilliamBergamin!
- ci: pin actions workflow step hashes and use minimum permissions in #1691 - Thanks @zimeg!
- chore: increase the robustness of the uninstall script in #1704 - Thanks @WilliamBergamin!
- chore(release): version 3.36.0 in #1707 - Thanks @zimeg!
Milestone: https://github.com/slackapi/python-slack-sdk/milestone/111
Full Changelog: v3.35.0...v3.36.0
version 3.35.0
What's Changed
➕ features
- feat: #1276 add Asyncio SQLAlchemy support by @galuszkak in #1633
- feat: add
channelsparam to files.upload v2 method by @seratch in #1641 - feat: support pathlike objects in upload util by @allen-pattern in #1656
- feat: WebClient/AsyncWebClient expose logger property by @WilliamBergamin in #1671
🐛 fixes
- fix: #1622 Additional check for exceptions from aiohttp by @lingfish in #1632
- fix: #1611 Add expand attribute to SectionBlock by @seratch in #1635
- fix: #1636 Custom Values passed into correctly into Bot/Installation class when cloned during token rotation by @seratch in #1638
- fix: Remove quotes from cookie value in OAuthStateUtils by @memben in #1648
- fix: max length for static option values by @xoob in #1655
📚 docs
- docs: Syncing config files with Deno Slack SDK and Slack CLI docs by @slackapi in #1619
- docs: Move Python OAuth Scopes and Uploading files with Python SDK tutorials to Python SDK site. by @technically-tracy in #1657
- docs: matches site css to slack.dev and docs.slack.dev by @slackapi in #1660
- fixes broken apps navbar link by @slackapi in #1666
- docs:
channel_idinstead ofchannelinfiles_upload_v2documentation by @WilliamBergamin in #1670
🏗️ maintenance
- health: move away from setup.py by @WilliamBergamin in #1623
- health: move to mypy by @WilliamBergamin in #1620
- health: remove pytest-runner from build-system.requires by @musicinmybrain in #1659
- docs: include packaging script steps in the maintainers guide by @zimeg in #1672
- fix: configure dependabot to group react deps by @WilliamBergamin in #1664
- chore: version 3.35.0 by @WilliamBergamin in #1674
dependabot
- chore(deps): bump pdoc3 from 0.11.3 to 0.11.5 by @dependabot in #1625
- chore(deps): update mypy requirement from <=1.13.0 to <=1.14.1 by @dependabot in #1626
- chore(deps): bump prism-react-renderer from 2.4.0 to 2.4.1 in /docs by @dependabot in #1627
- chore(deps): bump actions/stale from 9.0.0 to 9.1.0 by @dependabot in #1646
- chore(deps): bump the docusaurus group in /docs with 5 updates by @dependabot in #1643
- chore(deps): update psutil requirement from <7,>=6.0.0 to >=6.0.0,<8 by @dependabot in #1661
- chore(deps): update websockets requirement from <15,>=9.1 to >=9.1,<16 by @dependabot in #1662
- chore(deps): update mypy requirement from <=1.14.1 to <=1.15.0 by @dependabot in #1663
- chore(deps): bump the react group in /docs with 2 updates by @dependabot in #1665
- chore(deps): bump prismjs from 1.29.0 to 1.30.0 in /docs by @dependabot in #1668
New Contributors
- @lingfish made their first contribution in #1632
- @galuszkak made their first contribution in #1633
- @memben made their first contribution in #1648
- @xoob made their first contribution in #1655
- @technically-tracy made their first contribution in #1657
- @musicinmybrain made their first contribution in #1659
- @allen-pattern made their first contribution in #1656
- All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/108?closed=1
- All changes: v3.34.0...v3.35.0
version 3.34.0
Changes
- feat: add support for python 3.13 by @WilliamBergamin in #1614
- fix: 'ClientConnection' object has no attribute 'closed' when using socket mode with asyncio by @WilliamBergamin in #1613
- build: improve the stability of flaky tests by @WilliamBergamin in #1615
- build: enable tests that are now stable by @WilliamBergamin in #1617
Dependabot
- Bump path-to-regexp and express in /docs by @dependabot in #1610
- chore(deps): bump nanoid from 3.3.7 to 3.3.8 in /docs by @dependabot in #1616
- All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/110?closed=1
- All changes: v3.33.5...v3.34.0
version 3.33.5
Changes
- #1594 #1598 #1541 Improve WebClient's slack.com url overwriting experience - Thanks @HTSagara @WilliamBergamin
- #1609 SocketModeClient expose asyncio event loop param - Thanks @jantman
- #1602 Improve unit tests' mock server implementation - Thanks @WilliamBergamin
- #1608 "channel_id" instead of "channel" in "files_upload_v2" code example - Thanks @wefi-nick
- All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/109?closed=1
- All changes: v3.33.4...v3.33.5
version 3.33.4
Changes
- #1593 Error with socket_mode_handler.connect_async(), not passing bytes to ping w/ aiohttp 3.11 - Thanks @jasonwbarnett @bdraco @keviddles
- All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/107?closed=1
- All changes: v3.33.3...v3.33.4
version 3.33.3
Changes
- All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/106?closed=1
- All changes: v3.33.2...v3.33.3
version 3.33.2
Changes
- #1572 Fix #1571 initial_value for RichTextInputElement should also accept type RichTextBlock - Thanks @macintacos @seratch
- #1574 Switch canvases.* APIs to application/json format for more stability - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/105?closed=1
- All changes: v3.33.1...v3.33.2