Shared utilities for chat-py platform adapters
Project description
chat-adapter-shared
Shared helpers used by every chat-adapter-* package in chat-py. Python port of upstream packages/adapter-shared.
You only depend on this package directly if you're implementing a new adapter. Normal users pull it in transitively through chat-adapter-slack, chat-adapter-teams, etc.
Install
uv add chat-py-adapter-shared
What it ships
adapter_utils—extract_card,extract_files(pull card / file payloads out of a message).buffer_utils—to_buffer,to_buffer_sync,buffer_to_data_urifor fetching and normalizing file inputs (bytes, paths, URLs, data URIs).card_utils—card_to_fallback_text(plain-text rendering of a card),map_button_style,render_gfm_table,create_emoji_converter.errors— shared error hierarchy:AdapterError,AdapterRateLimitError,AuthenticationError,NetworkError,PermissionError,ResourceNotFoundError,ValidationError.
Parity notes
- 1:1 port of upstream helpers; function names and semantics match.
Test
uv run pytest packages/chat-adapter-shared
Upstream
https://github.com/vercel/chat/tree/main/packages/adapter-shared
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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