Skip to main content

Minimal Mattermost API client

Project description

mmc

mmc is a minimal Mattermost client for Python. It calls the v4 API endpoints and is meant for basic uses.

Install

pip install mmc

Usage

from mmc import Mattermost

m = Mattermost(
    "chat.example.com",
    access_token="...",
    team_id="...",
    team_slug="my-team",
)

print("Teams:")
for team in m.get_teams():
    print(f"* {team['display_name']}")

print("Users:")
for user in m.get_users():
    print(f"* {user['username']}")

for post in m.get_channel_posts(channel_id="..."):
    print(post["message"])

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

mmc-0.1.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

mmc-0.1.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

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