Skip to main content

Prefect collection of tasks and subflows to integrate with AWS

Project description

prefect-aws

PyPI

Welcome!

prefect-aws is a collection of pre-built Prefect tasks that can be used to quickly construct Prefect flows that interact with Amazon Web Services.

Getting Started

Python setup

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.

Installation

Install prefect-aws

pip install prefect-aws

A list of available blocks in prefect-aws and their setup instructions can be found here.

AWS Authentication

You will need to obtain AWS credentials in order to use these tasks. Refer to the AWS documentation for authentication methods available.

Write and run a flow

Upload and download from S3Bucket

from prefect import flow
from prefect_aws.s3 import S3Bucket

@flow
def example_flow():
    with open("hello.py", "w") as f:
        f.write("print('Hello world!')")

    s3_bucket = S3Bucket.load("my-bucket-test")
    s3_bucket.upload_from_path("hello.py")
    s3_bucket.download_object_to_path("hello.py", "downloaded_hello.py")

example_flow()

Use with_options to customize options on any existing task or flow

custom_example_flow = example_flow.with_options(
    name="My custom task name",
    retries=2,
    retry_delay_seconds=10,
) 

Next steps

Refer to the API documentation in the side menu to explore all the capabilities of Prefect AWS!

For more tips on how to use tasks and flows in a Collection, check out Using Collections!

Resources

If you have any questions or issues while using prefect-aws, you can find help in either the Prefect Discourse forum or the Prefect Slack community.

Feel free to star or watch prefect-aws for updates too!

Contribute

If you'd like to help contribute to fix an issue or add a feature to prefect-aws, please propose changes through a pull request from a fork of the repository.

Contribution Steps:

  1. Fork the repository
  2. Clone the forked repository
  3. Install the repository and its dependencies:
pip install -e ".[dev]"
  1. Make desired changes.
  2. Add tests.
  3. Insert an entry to CHANGELOG.md
  4. Install pre-commit to perform quality checks prior to commit:
pre-commit install
  1. git commit, git push, and create a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prefect-aws-0.2.3.tar.gz (52.3 kB view details)

Uploaded Source

Built Distribution

prefect_aws-0.2.3-py3-none-any.whl (37.1 kB view details)

Uploaded Python 3

File details

Details for the file prefect-aws-0.2.3.tar.gz.

File metadata

  • Download URL: prefect-aws-0.2.3.tar.gz
  • Upload date:
  • Size: 52.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for prefect-aws-0.2.3.tar.gz
Algorithm Hash digest
SHA256 0cf924fc84f46eb012827cab672b3369169ad882edc25ec480d6aa696d1e6e12
MD5 673ba7a5b3743a1c1e8b06c5f18ed2eb
BLAKE2b-256 4cc7135c8bfe58b1b7f4c3d999598298d6de5e922984f324d4f1f229db2680f2

See more details on using hashes here.

File details

Details for the file prefect_aws-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: prefect_aws-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 37.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for prefect_aws-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 65c618b7a3af959b49e742a33d9b5ff09fe915b6000305dcc870d9f735a2f20b
MD5 46fc195510647e79559f7469525bfd9d
BLAKE2b-256 2f51f859c8f9e41bd78909af5164aef12737496f03a6045d1867dfa168ff556f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page