Prefect collection of tasks and subflows to integrate with AWS
Project description
prefect-aws
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:
- Fork the repository
- Clone the forked repository
- Install the repository and its dependencies:
pip install -e ".[dev]"
- Make desired changes.
- Add tests.
- Insert an entry to CHANGELOG.md
- Install
pre-commit
to perform quality checks prior to commit:
pre-commit install
git commit
,git push
, and create a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cf924fc84f46eb012827cab672b3369169ad882edc25ec480d6aa696d1e6e12 |
|
MD5 | 673ba7a5b3743a1c1e8b06c5f18ed2eb |
|
BLAKE2b-256 | 4cc7135c8bfe58b1b7f4c3d999598298d6de5e922984f324d4f1f229db2680f2 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65c618b7a3af959b49e742a33d9b5ff09fe915b6000305dcc870d9f735a2f20b |
|
MD5 | 46fc195510647e79559f7469525bfd9d |
|
BLAKE2b-256 | 2f51f859c8f9e41bd78909af5164aef12737496f03a6045d1867dfa168ff556f |