{"id":24529530,"url":"https://github.com/gsy0911/slack-api-decorator","last_synced_at":"2026-02-22T22:46:15.694Z","repository":{"id":46956969,"uuid":"285942011","full_name":"gsy0911/slack-api-decorator","owner":"gsy0911","description":"Slack-API-decorator provides simple decorator to receive slack-payload: Slash Command and Event Subscription.","archived":false,"fork":false,"pushed_at":"2023-02-17T01:11:35.000Z","size":377,"stargazers_count":2,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T14:15:09.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gsy0911.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-08T00:04:10.000Z","updated_at":"2023-03-02T10:41:00.000Z","dependencies_parsed_at":"2023-01-31T02:46:01.598Z","dependency_job_id":null,"html_url":"https://github.com/gsy0911/slack-api-decorator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"gsy0911/template-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsy0911%2Fslack-api-decorator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsy0911%2Fslack-api-decorator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsy0911%2Fslack-api-decorator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsy0911%2Fslack-api-decorator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gsy0911","download_url":"https://codeload.github.com/gsy0911/slack-api-decorator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235082124,"owners_count":18932918,"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-01-22T07:38:16.305Z","updated_at":"2025-10-03T06:30:44.945Z","avatar_url":"https://github.com/gsy0911.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slack-api-decorator\n\n[![github-pytest](https://github.com/gsy0911/slack-api-decorator/workflows/pytest/badge.svg)](https://github.com/gsy0911/slack-api-decorator/actions?query=workflow%3Apytest)\n[![codecov](https://codecov.io/gh/gsy0911/slack-api-decorator/branch/master/graph/badge.svg)](https://codecov.io/gh/gsy0911/slack-api-decorator)\n[![PythonVersion](https://img.shields.io/badge/python-3.8|3.9-blue.svg)](https://www.python.org/downloads/release/python-3812/)\n[![PiPY](https://img.shields.io/pypi/v/slackapidecorator.svg)](https://pypi.org/project/slackapidecorator/)\n\nSlack-API-decorator provides simple decorator to receive slack-payload: `Slash Command` and `Event Subscription`. \n\n## install\n\n```bash\n$ pip install slackapidecorator\n```\n\n## usage\n\n### Slash Command\n\n```python\nfrom slack_api_decorator import SlashCommand \nsc = SlashCommand(app_name=\"sample\")\n\n@sc.add(command=\"/example\")\ndef accept_example(params):\n    return params\n\n\nsc.execute(params={\"payload from\": \"slack\"})\n```\n\n### Event Subscription\n\nThe events below are supported:\n\n* `file_upload`\n* `message`\n* `reaction_added`\n\n```python\nfrom slack_api_decorator import EventSubscription\n\nevent_subscription = EventSubscription(app_name=\"sample\")\n\n@event_subscription.add(event_type=\"file_upload\")\ndef file_upload_example(params):\n    return params\n\n@event_subscription.add(\"reaction_added\", channel_id=\"Uxxxxxxxx\")\ndef reaction_added_in_channel(params):\n    return params\n\nevent_subscription.execute(params={\"payload from\": \"slack\"})\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsy0911%2Fslack-api-decorator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsy0911%2Fslack-api-decorator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsy0911%2Fslack-api-decorator/lists"}