Skip to main content

Simple way to handle teams workflow with python

Project description

Simple way to handle teams workflow message with python. It supports sending message cards to the Teams channel

Installation

install the latest stable version using pip

$ pip install simple-msteams

Usage

from simple_msteams.client import Client

url = < WORKFLOW URL >
timeout = < TIMEOUT > # default 15 seconds

c = Client(url) # if you set a timeout, use to c = Client(url, timeout)

Functions

safe_send

This function performs the function of sending messages to the teams.

# string or dict
# string: "this is sample message"
# dictionary: '{"type": "TextBlock", "text": "this is sample message", "weight": "bolder", "size": "medium"}'
msg = < MESSAGE >

c.safe_send(msg)

Use console scripts

# timeout not required. default 15
simple_msteams --url < WORLFLOW URL > --msg < MESSAGE > --timeout < TIMEOUT >

Example

# timeout not required. default 15
simple_msteams --url 'http://test.workflow.url' --msg 'this is sample message' --timeout 30

# if use dictionary
simple_msteams --url 'http://test.workflow.url' --msg '{\"type\": \"TextBlock\", \"text\": \"this is sample message\", \"weight\": \"bolder\", \"size\": \"medium\"}' --timeout 30

Project details


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

simple_msteams-0.0.6-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file simple_msteams-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_msteams-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7e0ab8dc424c6b4129ec9d03b0a3382341cd92ca1dd25dc335eda12ed2381ba0
MD5 5297ce7a9121df1736412a0c008b017e
BLAKE2b-256 6fa9d3b025ba99bc21a34322de55965ad57eeb1d3041c4425c5da41dbb69aa98

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page