{"id":25735703,"url":"https://github.com/alertua/msteamsapi","last_synced_at":"2025-05-07T23:21:07.908Z","repository":{"id":249669480,"uuid":"832005970","full_name":"ALERTua/msteamsapi","owner":"ALERTua","description":"Microsoft Teams AdaptiveCards API Wrapper for Python 2 and 3","archived":false,"fork":false,"pushed_at":"2025-05-06T15:47:34.000Z","size":141,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T16:12:17.155Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/msteamsapi/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ALERTua.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-22T06:59:53.000Z","updated_at":"2025-05-06T15:47:32.000Z","dependencies_parsed_at":"2025-03-17T19:24:51.368Z","dependency_job_id":"9c2f440b-417d-4eb1-b4a8-5fa09ccc761f","html_url":"https://github.com/ALERTua/msteamsapi","commit_stats":null,"previous_names":["alertua/msteamsapi"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALERTua%2Fmsteamsapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALERTua%2Fmsteamsapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALERTua%2Fmsteamsapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALERTua%2Fmsteamsapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ALERTua","download_url":"https://codeload.github.com/ALERTua/msteamsapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252968867,"owners_count":21833371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-26T05:31:42.227Z","updated_at":"2025-05-07T23:21:07.902Z","avatar_url":"https://github.com/ALERTua.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct-single.svg)](https://stand-with-ukraine.pp.ua)\n[![Made in Ukraine](https://img.shields.io/badge/made_in-Ukraine-ffd700.svg?labelColor=0057b7)](https://stand-with-ukraine.pp.ua)\n[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)\n[![Russian Warship Go Fuck Yourself](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/RussianWarship.svg)](https://stand-with-ukraine.pp.ua)\n\n# Microsoft Teams AdaptiveCards API Wrapper for Python 2 and 3\n\n##### Repository: https://github.com/ALERTua/msteamsapi\n##### PyPi: https://pypi.org/project/msteamsapi/\n\n[![Package and PyPi Upload](https://github.com/ALERTua/msteamsapi/actions/workflows/python-package.yml/badge.svg)](https://github.com/ALERTua/msteamsapi/actions/workflows/python-package.yml)\n[![DEV Package and TestPyPi Upload](https://github.com/ALERTua/msteamsapi/actions/workflows/python-dev-package.yml/badge.svg)](https://github.com/ALERTua/msteamsapi/actions/workflows/python-dev-package.yml)\n[![Commit Checks](https://github.com/ALERTua/msteamsapi/actions/workflows/commit.yml/badge.svg)](https://github.com/ALERTua/msteamsapi/actions/workflows/commit.yml)\n\n\n## Usage\n\n- `pip install msteamsapi`\n- Get a Workflow Webhook URL for your MSTeams non-private(!) channel using the standard template `Post to a channel when a webhook request is received`.\n- Use the Webhook URL to instantiate `TeamsWebhook` class.\n- Fill the `TeamsWebhook` with `AdaptiveCard`.\n- Fill the `AdaptiveCard` with `Container`.\n- Fill the `Container` with `FactSet`, `TextBlock`, etc.\n- `send()` the `TeamsWebhook` instance.\n\nExample from [tests/test_suite.py](tests/test_suite.py):\n\n```python\nfrom msteamsapi import TeamsWebhook, AdaptiveCard, Container, FactSet, ContainerStyle, TextWeight, TextSize\n\nwebhook = TeamsWebhook('your_webhook_url')\n\ncard = AdaptiveCard(title='card title', title_style=ContainerStyle.DEFAULT)\ncard.add_background(url=\"https://github.com/ALERTua/msteamsapi/raw/main/tests/background.png\")\n\ncontainer = Container(style=ContainerStyle.DEFAULT)\n\ncard.mention('EMAIL', 'NAME', add_text_block=True)\nmention_tag = card.mention('EMAIL', 'mention text')\n\ncontainer.add_image(\"image url\", \"image alt text\")\ncontainer.add_text_block(\n    'multiline\\n\\ntext\\n\\nmention 1: %s' % mention_tag,\n    size=TextSize.DEFAULT, weight=TextWeight.DEFAULT, color=\"default\", wrap=True\n)\n\nfactset = FactSet(('fact 1', 'fact 1 value'))\nfactset.add_facts(('fact 2', 'fact 2 value'), ('fact 3', 'fact 3 value'))\ncontainer.add_fact_set(factset)\n\ncard.add_container(container)\n\nfor i, url in enumerate(['https://google.com/', 'https://goo.gle']):\n    card.add_url_button('url %s' % i, url)\n\nwebhook.add_cards(card)\nwebhook.send()\n```\n\nYour [contribution](CONTRIBUTING.md) is appreciated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falertua%2Fmsteamsapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falertua%2Fmsteamsapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falertua%2Fmsteamsapi/lists"}