PostX is a package that provides a simple interface for posting messages to multiple platforms.
Project description
Python PostX
PostX is a package that provides a simple interface for posting messages to multiple platforms. The user has the ability to send the same message to multiple services or to an indivdual service. The same message is translated to the appropriate calls for the each platform.
Full Docs: Here
Getting Started
Installing via pip
pip install python-postx
Quick Start
from postx import Broker
from postx.message import Message
# Create the broker
broker = Broker()
# You can register as many endpoints as you wish of any combination
broker.register('slack', 'your slack webhook url')
broker.register('teams', 'your teams webhook url')
# Make your message
message = Message()
message.title('My Awesome Update')
message.sub_title('This is an awesome update')
message.text('The update is for all people to see and affects everything')
message.list_unordered(['item 1', 'item 2'])
message.link('Read More Here', 'link to more information')
# Or a shorter way
message = Message()
message.title('My Awesome Update') \
.sub_title('This is an awesome update') \
.text('The update is for all people to see and affects everything') \
.list_unordered(['item 1', 'item 2']) \
.link('Read More Here', 'link to more information')
# Or even shorter
message = Message()
message.title('My Awesome Update') \
.sub('This is an awesome update') \
.text('The update is for all people to see and affects everything') \
.ul(['item 1', 'item 2']) \
.link('Read More Here', 'link to more information')
# Send the message to all
broker.send(message)
# Send the message to slack only
broker.send_single_service(message, 'slack')
# Send the message to a single endpoint
broker.send_single_link(message, 'your registered endpoint url')
Supported targets
- Microsoft Teams
- Slack
Meta
Kyle Mason - Mediatech15 - Gitlab
Distributed under the MIT license. See LICENSE for more information.
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
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 python-postx-1.0.4.tar.gz.
File metadata
- Download URL: python-postx-1.0.4.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f4307c2ab672170419eba304a50230d3fe8f1d6a413a102e95331272cbbf93b
|
|
| MD5 |
e467bbbf4b38c7f6dcccc58d18f2ea83
|
|
| BLAKE2b-256 |
6a49bea9aa162d0042a8fbfa5f4c6960150b741c2476562f5bfd6ce85c79961f
|
File details
Details for the file python_postx-1.0.4-py3-none-any.whl.
File metadata
- Download URL: python_postx-1.0.4-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6731bb1b6f55a986b2f9382b2acf8388da30515b74842c223a486f642fad957
|
|
| MD5 |
8338713686e0dbdfc52fceebd8aec286
|
|
| BLAKE2b-256 |
20ec8098c0a2c2b1f0af4d9c5d584d76125ab6572e44ceb3372d3607caa71c66
|