prefect-sns


Nameprefect-sns JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/danielhstahl/prefect-sns
SummaryPrefect block for integration with AWS SNS
upload_time2023-06-19 11:03:53
maintainer
docs_urlNone
authorDaniel Stahl
requires_python>=3.7
licenseApache License 2.0
keywords prefect
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # prefect-sns

<p align="center">
    <!--- Insert a cover image here -->
    <!--- <br> -->
    <a href="https://pypi.python.org/pypi/prefect-sns/" alt="PyPI version">
        <img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-sns?color=0052FF&labelColor=090422"></a>
    <a href="https://github.com/danielhstahl/prefect-sns/" alt="Stars">
        <img src="https://img.shields.io/github/stars/danielhstahl/prefect-sns?color=0052FF&labelColor=090422" /></a>
    <a href="https://pypistats.org/packages/prefect-sns/" alt="Downloads">
        <img src="https://img.shields.io/pypi/dm/prefect-sns?color=0052FF&labelColor=090422" /></a>
    <a href="https://github.com/danielhstahl/prefect-sns/pulse" alt="Activity">
        <img src="https://img.shields.io/github/commit-activity/m/danielhstahl/prefect-sns?color=0052FF&labelColor=090422" /></a>
    <br>
    <a href="https://prefect-community.slack.com" alt="Slack">
        <img src="https://img.shields.io/badge/slack-join_community-red.svg?color=0052FF&labelColor=090422&logo=slack" /></a>
    <a href="https://discourse.prefect.io/" alt="Discourse">
        <img src="https://img.shields.io/badge/discourse-browse_forum-red.svg?color=0052FF&labelColor=090422&logo=discourse" /></a>
</p>

Visit the full docs [here](https://danielhstahl.github.io/prefect-sns) to see additional examples and the API reference.

Prefect block for integration with AWS SNS


<!--- ### Add a real-world example of how to use this Collection here

Offer some motivation on why this helps.

After installing `prefect-sns` and [saving the credentials](#saving-credentials-to-block), you can easily use it within your flows to help you achieve the aforementioned benefits!

```python
from prefect import flow, get_run_logger
```

--->

## Resources

For more tips on how to use tasks and flows in a Collection, check out [Using Collections](https://docs.prefect.io/collections/usage/)!

### Installation

Install `prefect-sns` with `pip`:

```bash
pip install prefect-sns
```

Requires an installation of Python 3.7+.

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/).

<!--- ### Saving credentials to block

Note, to use the `load` method on Blocks, you must already have a block document [saved through code](https://docs.prefect.io/concepts/blocks/#saving-blocks) or [saved through the UI](https://docs.prefect.io/ui/blocks/).

Below is a walkthrough on saving block documents through code.

1. Head over to <SERVICE_URL>.
2. Login to your <SERVICE> account.
3. Click "+ Create new secret key".
4. Copy the generated API key.
5. Create a short script, replacing the placeholders (or do so in the UI).

```python
from prefect_sns import Block
Block(api_key="API_KEY_PLACEHOLDER").save("BLOCK_NAME_PLACEHOLDER")
```

Congrats! You can now easily load the saved block, which holds your credentials:

```python
from prefect_sns import Block
Block.load("BLOCK_NAME_PLACEHOLDER")
```

!!! info "Registering blocks"

    Register blocks in this module to
    [view and edit them](https://docs.prefect.io/ui/blocks/)
    on Prefect Cloud:

    ```bash
    prefect block register -m prefect_sns
    ```

A list of available blocks in `prefect-sns` and their setup instructions can be found [here](https://danielhstahl.github.io/prefect-sns/blocks_catalog).

--->

### Feedback

If you encounter any bugs while using `prefect-sns`, feel free to open an issue in the [prefect-sns](https://github.com/danielhstahl/prefect-sns) repository.

If you have any questions or issues while using `prefect-sns`, you can find help in either the [Prefect Discourse forum](https://discourse.prefect.io/) or the [Prefect Slack community](https://prefect.io/slack).

Feel free to star or watch [`prefect-sns`](https://github.com/danielhstahl/prefect-sns) for updates too!

### Contributing

If you'd like to help contribute to fix an issue or add a feature to `prefect-sns`, please [propose changes through a pull request from a fork of the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).

Here are the steps:

1. [Fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository)
2. [Clone the forked repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository)
3. Install the repository and its dependencies:
```
pip install -e ".[dev]"
```
4. Make desired changes
5. Add tests
6. Insert an entry to [CHANGELOG.md](https://github.com/danielhstahl/prefect-sns/blob/main/CHANGELOG.md)
7. Install `pre-commit` to perform quality checks prior to commit:
```
pre-commit install
```
8. `git commit`, `git push`, and create a pull request

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/danielhstahl/prefect-sns",
    "name": "prefect-sns",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "prefect",
    "author": "Daniel Stahl",
    "author_email": "danstahl1138@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/72/ad/a88d2e8f073e8ab0fa0682a7dd0768a94d76a5adfe92c0eb55714fc0843c/prefect-sns-0.3.1.tar.gz",
    "platform": null,
    "description": "# prefect-sns\n\n<p align=\"center\">\n    <!--- Insert a cover image here -->\n    <!--- <br> -->\n    <a href=\"https://pypi.python.org/pypi/prefect-sns/\" alt=\"PyPI version\">\n        <img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/prefect-sns?color=0052FF&labelColor=090422\"></a>\n    <a href=\"https://github.com/danielhstahl/prefect-sns/\" alt=\"Stars\">\n        <img src=\"https://img.shields.io/github/stars/danielhstahl/prefect-sns?color=0052FF&labelColor=090422\" /></a>\n    <a href=\"https://pypistats.org/packages/prefect-sns/\" alt=\"Downloads\">\n        <img src=\"https://img.shields.io/pypi/dm/prefect-sns?color=0052FF&labelColor=090422\" /></a>\n    <a href=\"https://github.com/danielhstahl/prefect-sns/pulse\" alt=\"Activity\">\n        <img src=\"https://img.shields.io/github/commit-activity/m/danielhstahl/prefect-sns?color=0052FF&labelColor=090422\" /></a>\n    <br>\n    <a href=\"https://prefect-community.slack.com\" alt=\"Slack\">\n        <img src=\"https://img.shields.io/badge/slack-join_community-red.svg?color=0052FF&labelColor=090422&logo=slack\" /></a>\n    <a href=\"https://discourse.prefect.io/\" alt=\"Discourse\">\n        <img src=\"https://img.shields.io/badge/discourse-browse_forum-red.svg?color=0052FF&labelColor=090422&logo=discourse\" /></a>\n</p>\n\nVisit the full docs [here](https://danielhstahl.github.io/prefect-sns) to see additional examples and the API reference.\n\nPrefect block for integration with AWS SNS\n\n\n<!--- ### Add a real-world example of how to use this Collection here\n\nOffer some motivation on why this helps.\n\nAfter installing `prefect-sns` and [saving the credentials](#saving-credentials-to-block), you can easily use it within your flows to help you achieve the aforementioned benefits!\n\n```python\nfrom prefect import flow, get_run_logger\n```\n\n--->\n\n## Resources\n\nFor more tips on how to use tasks and flows in a Collection, check out [Using Collections](https://docs.prefect.io/collections/usage/)!\n\n### Installation\n\nInstall `prefect-sns` with `pip`:\n\n```bash\npip install prefect-sns\n```\n\nRequires an installation of Python 3.7+.\n\nWe recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.\n\nThese 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/).\n\n<!--- ### Saving credentials to block\n\nNote, to use the `load` method on Blocks, you must already have a block document [saved through code](https://docs.prefect.io/concepts/blocks/#saving-blocks) or [saved through the UI](https://docs.prefect.io/ui/blocks/).\n\nBelow is a walkthrough on saving block documents through code.\n\n1. Head over to <SERVICE_URL>.\n2. Login to your <SERVICE> account.\n3. Click \"+ Create new secret key\".\n4. Copy the generated API key.\n5. Create a short script, replacing the placeholders (or do so in the UI).\n\n```python\nfrom prefect_sns import Block\nBlock(api_key=\"API_KEY_PLACEHOLDER\").save(\"BLOCK_NAME_PLACEHOLDER\")\n```\n\nCongrats! You can now easily load the saved block, which holds your credentials:\n\n```python\nfrom prefect_sns import Block\nBlock.load(\"BLOCK_NAME_PLACEHOLDER\")\n```\n\n!!! info \"Registering blocks\"\n\n    Register blocks in this module to\n    [view and edit them](https://docs.prefect.io/ui/blocks/)\n    on Prefect Cloud:\n\n    ```bash\n    prefect block register -m prefect_sns\n    ```\n\nA list of available blocks in `prefect-sns` and their setup instructions can be found [here](https://danielhstahl.github.io/prefect-sns/blocks_catalog).\n\n--->\n\n### Feedback\n\nIf you encounter any bugs while using `prefect-sns`, feel free to open an issue in the [prefect-sns](https://github.com/danielhstahl/prefect-sns) repository.\n\nIf you have any questions or issues while using `prefect-sns`, you can find help in either the [Prefect Discourse forum](https://discourse.prefect.io/) or the [Prefect Slack community](https://prefect.io/slack).\n\nFeel free to star or watch [`prefect-sns`](https://github.com/danielhstahl/prefect-sns) for updates too!\n\n### Contributing\n\nIf you'd like to help contribute to fix an issue or add a feature to `prefect-sns`, please [propose changes through a pull request from a fork of the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).\n\nHere are the steps:\n\n1. [Fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository)\n2. [Clone the forked repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository)\n3. Install the repository and its dependencies:\n```\npip install -e \".[dev]\"\n```\n4. Make desired changes\n5. Add tests\n6. Insert an entry to [CHANGELOG.md](https://github.com/danielhstahl/prefect-sns/blob/main/CHANGELOG.md)\n7. Install `pre-commit` to perform quality checks prior to commit:\n```\npre-commit install\n```\n8. `git commit`, `git push`, and create a pull request\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Prefect block for integration with AWS SNS",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/danielhstahl/prefect-sns"
    },
    "split_keywords": [
        "prefect"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "08c9e28aa98670898c7ad1be486e8a576270f45fc7b560e874add6b75a55f758",
                "md5": "dab0af2dc9836e9a47cbdaa53c8a4128",
                "sha256": "bb87ee3555a285435506d7a9b125d72682b4801a533de08fedd54aa34edbc8f1"
            },
            "downloads": -1,
            "filename": "prefect_sns-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dab0af2dc9836e9a47cbdaa53c8a4128",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10222,
            "upload_time": "2023-06-19T11:03:51",
            "upload_time_iso_8601": "2023-06-19T11:03:51.789340Z",
            "url": "https://files.pythonhosted.org/packages/08/c9/e28aa98670898c7ad1be486e8a576270f45fc7b560e874add6b75a55f758/prefect_sns-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "72ada88d2e8f073e8ab0fa0682a7dd0768a94d76a5adfe92c0eb55714fc0843c",
                "md5": "34ff458a55d050df1a817d3954167b16",
                "sha256": "b9fb936070e6b676052a4fffd2e57b9166ed41fcc8db9208c8f3dd4a5a8ec2f0"
            },
            "downloads": -1,
            "filename": "prefect-sns-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "34ff458a55d050df1a817d3954167b16",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 27067,
            "upload_time": "2023-06-19T11:03:53",
            "upload_time_iso_8601": "2023-06-19T11:03:53.070742Z",
            "url": "https://files.pythonhosted.org/packages/72/ad/a88d2e8f073e8ab0fa0682a7dd0768a94d76a5adfe92c0eb55714fc0843c/prefect-sns-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-19 11:03:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "danielhstahl",
    "github_project": "prefect-sns",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "prefect-sns"
}
        
Elapsed time: 0.09283s