{"id":15714476,"url":"https://github.com/dondebonair/slack-machine","last_synced_at":"2025-05-14T11:10:27.190Z","repository":{"id":37899922,"uuid":"102102105","full_name":"DonDebonair/slack-machine","owner":"DonDebonair","description":"A simple, yet powerful and extendable Slack bot","archived":false,"fork":false,"pushed_at":"2025-04-10T18:47:06.000Z","size":3943,"stargazers_count":764,"open_issues_count":24,"forks_count":56,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-10T19:59:02.902Z","etag":null,"topics":["ai","bot","bot-framework","chatbot","python","slack","slack-api","slack-bot","slackapi","slackbot"],"latest_commit_sha":null,"homepage":"https://dondebonair.github.io/slack-machine/","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/DonDebonair.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-01T10:26:33.000Z","updated_at":"2025-04-02T18:32:36.000Z","dependencies_parsed_at":"2024-02-08T20:39:36.206Z","dependency_job_id":"0f03e496-ba5c-41f9-b4da-da1ba6458905","html_url":"https://github.com/DonDebonair/slack-machine","commit_stats":{"total_commits":638,"total_committers":20,"mean_commits":31.9,"dds":0.6551724137931034,"last_synced_commit":"969afc4aaa703342ab1599494816b711e1f309c6"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonDebonair%2Fslack-machine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonDebonair%2Fslack-machine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonDebonair%2Fslack-machine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonDebonair%2Fslack-machine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DonDebonair","download_url":"https://codeload.github.com/DonDebonair/slack-machine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248509967,"owners_count":21116125,"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":["ai","bot","bot-framework","chatbot","python","slack","slack-api","slack-bot","slackapi","slackbot"],"created_at":"2024-10-03T21:37:24.781Z","updated_at":"2025-04-12T02:55:16.334Z","avatar_url":"https://github.com/DonDebonair.png","language":"Python","readme":"# Slack Machine\n\n[![Join the chat at Slack](https://img.shields.io/badge/chat-slack-green?logo=slack\u0026logoColor=white)](https://join.slack.com/t/slack-machine-chat/shared_invite/zt-1g87tzvlf-8bV_WnY3JZyaYNnRFwRd~w)\n[![image](https://img.shields.io/pypi/v/slack-machine.svg)](https://pypi.python.org/pypi/slack-machine)\n[![image](https://img.shields.io/pypi/l/slack-machine.svg)](https://pypi.python.org/pypi/slack-machine)\n[![image](https://img.shields.io/pypi/pyversions/slack-machine.svg)](https://pypi.python.org/pypi/slack-machine)\n[![CI Status](https://github.com/DonDebonair/slack-machine/actions/workflows/ci.yml/badge.svg)](https://github.com/DonDebonair/slack-machine/actions/workflows/ci.yml)\n[![image](https://codecov.io/gh/DonDebonair/slack-machine/branch/main/graph/badge.svg)](https://codecov.io/gh/DonDebonair/slack-machine)\n\nSlack Machine is a simple, yet powerful and extendable Slack bot framework. More than just a bot, Slack\nMachine is a framework that helps you develop your Slack workspace into a ChatOps powerhouse. Slack Machine is built\nwith an intuitive plugin system that lets you build bots quickly, but also allows for easy code organization. A\nplugin can look as simple as this:\n\n```python\nfrom machine.plugins.base import MachineBasePlugin\nfrom machine.plugins.message import Message\nfrom machine.plugins.decorators import respond_to\n\n\nclass DeploymentPlugin(MachineBasePlugin):\n    \"\"\"Deployments\"\"\"\n\n    @respond_to(r\"deploy (?P\u003capplication\u003e\\w+) to (?P\u003cenvironment\u003e\\w+)\")\n    async def deploy(self, msg: Message, application, environment):\n        \"\"\"deploy \u003capplication\u003e \u003cenvironment\u003e: deploy application to target environment\"\"\"\n        await msg.say(f\"Deploying {application} to {environment}\")\n```\n\n## _Breaking Changes_\n\n**Dropped support for Python 3.8** (v0.38.0)\n\nAs of [v0.38.0](https://github.com/DonDebonair/slack-machine/releases/tag/v0.38.0), support for Python 3.8 has been\ndropped. Python 3.8 has reached end-of-life on 2024-10-07.\n\n## Features\n\n- Get started with mininal configuration\n- Built on top of the [Slack Events API](https://api.slack.com/apis/connections/events-api) for smoothly responding\n  to events in semi real-time. Uses [Socket Mode](https://api.slack.com/apis/connections/socket) so your bot doesn't\n  need to be exposed to the internet!\n- Support for rich interactions using the [Slack Web API](https://api.slack.com/web)\n- High-level API for maximum convenience when building plugins\n- Low-level API for maximum flexibility\n- Built on top of [AsyncIO](https://docs.python.org/3/library/asyncio.html) to ensure good performance by handling\n  communication with Slack concurrently\n\n### Plugin API features:\n\n- Listen and respond to any regular expression\n- Respond to Slash Commands\n- Capture parts of messages to use as variables in your functions\n- Respond to messages in channels, groups and direct message conversations\n- Respond with reactions\n- Respond in threads\n- Respond with ephemeral messages\n- Send DMs to any user\n- Support for [blocks](https://api.slack.com/reference/block-kit/blocks)\n- Support for [message attachments](https://api.slack.com/docs/message-attachments) [Legacy 🏚]\n- Support for [interactive elements](https://api.slack.com/block-kit)\n- Support for [modals](https://api.slack.com/surfaces/modals)\n- Listen and respond to any [Slack event](https://api.slack.com/events) supported by the Events API\n- Store and retrieve any kind of data in persistent storage (currently Redis, DynamoDB, SQLite and in-memory storage are\n  supported)\n- Schedule actions and messages\n- Emit and listen for events\n- Help texts for Plugins\n\n### Coming Soon\n\n- Support for shortcuts\n- ... and much more\n\n## Installation\n\nYou can add Slack Machine to your uv project by running:\n\n```bash\nuv add slack-machine\n```\n\nor add it to your [Poetry](https://python-poetry.org/) project:\n\n```bash\npoetry add slack-machine\n```\n\nLastly, you can install it using pip (not recommended):\n\n``` bash\n$ pip install slack-machine\n```\n\nIt is **strongly recommended** that you install `slack-machine` inside a\n[virtual environment](https://docs.python.org/3/tutorial/venv.html)!\n\n## Usage\n\n1. Create a directory for your Slack Machine bot: `mkdir my-slack-bot \u0026\u0026 cd my-slack-bot`\n2. Add a `local_settings.py` file to your bot directory: `touch local_settings.py`\n3. Create a new app in Slack: \u003chttps://api.slack.com/apps\u003e\n4. Choose to create an app from an _App manifest_\n5. Copy/paste the following manifest: [`manifest.yaml`](docs/extra/manifest.yaml)\n6. Add the Slack App and Bot tokens to your `local_settings.py` like this:\n\n    ``` title=\"local_settings.py\"\n    SLACK_APP_TOKEN = \"xapp-my-app-token\"\n    SLACK_BOT_TOKEN = \"xoxb-my-bot-token\"\n    ```\n\n7. Start the bot with `slack-machine`\n8. ...\n9. Profit!\n\n## Documentation\n\nYou can find the documentation for Slack Machine here: https://dondebonair.github.io/slack-machine/\n\nGo read it to learn how to properly configure Slack Machine, write plugins, and more!\n\nThere is also an example plugin that shows off many of the features of Slack Machine:\n[Slack Machine Kitchensink Plugin](https://github.com/DonDebonair/sm-kitchensink-plugin)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdondebonair%2Fslack-machine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdondebonair%2Fslack-machine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdondebonair%2Fslack-machine/lists"}