prefect-slack-0.3.1


توضیحات

Prefect integrations with Slack
ویژگی مقدار
سیستم عامل -
نام فایل prefect-slack-0.3.1
نام prefect-slack
نسخه کتابخانه 0.3.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده "Prefect Technologies, Inc." <help@prefect.io>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/prefect-slack/
مجوز Apache License 2.0
# prefect-slack ## Welcome! `prefect-slack` is a collection of prebuilt Prefect tasks that can be used to quickly construct Prefect flows. ## Getting Started ### Python setup Requires an installation of Python 3.9+ We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv. These tasks are designed to work with Prefect 2.0. For more information about how to use Prefect, please refer to the [Prefect documentation](https://docs.prefect.io/). ### Installation Install `prefect-slack` ```bash pip install prefect-slack ``` ### Slack setup In order to use tasks in the collection, you'll first need to create an Slack app and install it in your Slack workspace. You can create a Slack app by navigating to the [apps page](https://api.slack.com/apps) for your Slack account and selecting 'Create New App'. For tasks that require a Bot user OAuth token, you can get a token for your app by navigating to your apps __OAuth & Permissions__ page. For tasks that require and Webhook URL, you get generate new Webhook URLs by navigating to you apps __Incoming Webhooks__ page. Slack's [Basic app setup](https://api.slack.com/authentication/basics) guide provides additional details on setting up a Slack app. ### Write and run a flow ```python from prefect import flow from prefect.context import get_run_context from prefect_slack import SlackCredentials from prefect_slack.messages import send_chat_message @flow def example_send_message_flow(): context = get_run_context() # Run other tasks and subflows here token = "xoxb-your-bot-token-here" send_chat_message( slack_credentials=SlackCredentials(token), channel="#prefect", text=f"Flow run {context.flow_run.name} completed :tada:" ) example_send_message_flow() ```


نیازمندی

مقدار نام
- aiohttp
- slack-sdk>=3.15.1
- prefect>=3.0.0
xtr coverage;
xtr interrogate;
xtr mkdocs-gen-files;
xtr mkdocs-material;
xtr mkdocs;
xtr mkdocstrings[python];
xtr mypy;
xtr pillow;
xtr pre-commit;
xtr pytest-asyncio;
xtr pytest>=8.3;
xtr pytest-env;
xtr pytest-xdist;


زبان مورد نیاز

مقدار نام
>=3.9 Python


نحوه نصب


نصب پکیج whl prefect-slack-0.3.1:

    pip install prefect-slack-0.3.1.whl


نصب پکیج tar.gz prefect-slack-0.3.1:

    pip install prefect-slack-0.3.1.tar.gz