Python wrapper for the OpenParallax channels module
Project description
openparallax-channels
Multi-channel messaging adapters (WhatsApp, Telegram, Discord, Signal, iMessage)
Python wrapper for the OpenParallax channels module. Communicates with a pre-built Go binary over JSON-RPC (stdin/stdout).
Installation
pip install openparallax-channels
Usage
from openparallax_channels import Channels
with Channels() as ch:
# Split a long message into platform-safe chunks
parts = ch.split_message(long_text, max_length=2000)
# Format a message (0=plain, 1=markdown, 2=HTML)
msg = ch.format_message("Hello!", format=1)
Passing Channel Credentials
Channel credentials (bot tokens, API keys, webhook URLs) are passed through OpenParallax's workspace config.yaml, not through this wrapper directly. The wrapper communicates with the Go channels-bridge binary, which reads credentials from the workspace config.
Configure channels in your workspace config.yaml:
channels:
telegram:
enabled: true
bot_token_env: TELEGRAM_BOT_TOKEN
discord:
enabled: true
bot_token_env: DISCORD_BOT_TOKEN
slack:
enabled: true
bot_token_env: SLACK_BOT_TOKEN
app_token_env: SLACK_APP_TOKEN
Telegram Example
export TELEGRAM_BOT_TOKEN="123456:ABC-DEF..."
# config.yaml
channels:
telegram:
enabled: true
bot_token_env: TELEGRAM_BOT_TOKEN
from openparallax_channels import Channels
with Channels() as ch:
parts = ch.split_message(response_text, max_length=4096)
for part in parts:
send_to_telegram(chat_id, part)
Documentation
See the channels documentation for all supported platforms and configuration options.
License
Apache License 2.0
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 openparallax_channels-0.1.1.tar.gz.
File metadata
- Download URL: openparallax_channels-0.1.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f5e5a50d9c043feb147a7e37b85ecf2b661f1dbcc46f631cb95d5937260c784
|
|
| MD5 |
e953ba616d53af94567b531edadb4870
|
|
| BLAKE2b-256 |
efcf4f8a4bf35a9fc64c32016f1d5da8eefcd797745dcd47783c071cc3a4d829
|
Provenance
The following attestation bundles were made for openparallax_channels-0.1.1.tar.gz:
Publisher:
release.yml on openparallax/openparallax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openparallax_channels-0.1.1.tar.gz -
Subject digest:
8f5e5a50d9c043feb147a7e37b85ecf2b661f1dbcc46f631cb95d5937260c784 - Sigstore transparency entry: 1293676470
- Sigstore integration time:
-
Permalink:
openparallax/openparallax@037b61fa9ad9a5859c36cc46db752bab1c3a4f2d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/openparallax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@037b61fa9ad9a5859c36cc46db752bab1c3a4f2d -
Trigger Event:
push
-
Statement type:
File details
Details for the file openparallax_channels-0.1.1-py3-none-any.whl.
File metadata
- Download URL: openparallax_channels-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b468a577a2b82985a1c6f3c7812654da0126ea808108d91c2d86c9a44de2a85
|
|
| MD5 |
2f2c319df6c19a706990d1b8cdaa102a
|
|
| BLAKE2b-256 |
65c2452ef845943742a058ddbcfd76b14348f4db20e7b80e6964881e19a0eae1
|
Provenance
The following attestation bundles were made for openparallax_channels-0.1.1-py3-none-any.whl:
Publisher:
release.yml on openparallax/openparallax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openparallax_channels-0.1.1-py3-none-any.whl -
Subject digest:
1b468a577a2b82985a1c6f3c7812654da0126ea808108d91c2d86c9a44de2a85 - Sigstore transparency entry: 1293676480
- Sigstore integration time:
-
Permalink:
openparallax/openparallax@037b61fa9ad9a5859c36cc46db752bab1c3a4f2d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/openparallax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@037b61fa9ad9a5859c36cc46db752bab1c3a4f2d -
Trigger Event:
push
-
Statement type: