Skip to main content

Prefect tasks and subflows for interacting with shell commands.

Project description

prefect-shell

PyPI

Welcome!

prefect-shell 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.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-shell with pip:

pip install prefect-shell

Then, register to view the block on Prefect Cloud:

prefect block register -m prefect_shell.credentials

Note, to use the load method on Blocks, you must already have a block document saved through code or saved through the UI.

Write and run a flow

from prefect import flow
from prefect_shell import shell_run_command

@flow
def example_shell_run_command_flow():
    return shell_run_command(command="ls .", return_all=True)

example_shell_run_command_flow()

Resources

If you encounter and bugs while using prefect-shell, feel free to open an issue in the prefect-shell repository.

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

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

Development

If you'd like to install a version of prefect-shell for development, clone the repository and perform an editable install with pip:

git clone https://github.com/PrefectHQ/prefect-shell.git

cd prefect-shell/

pip install -e ".[dev]"

# Install linting pre-commit hooks
pre-commit install

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-shell-0.1.2.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

prefect_shell-0.1.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file prefect-shell-0.1.2.tar.gz.

File metadata

  • Download URL: prefect-shell-0.1.2.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for prefect-shell-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ed60ffb362f750f35baaba0072a17345a30d4b38397c2b32bbccaff677d1b8b4
MD5 8f7acaec053176edad30507da071bb6c
BLAKE2b-256 f5f6a371314ced19a548895f79a0824d42f2db6863f81b5e062d783c147d0b86

See more details on using hashes here.

File details

Details for the file prefect_shell-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for prefect_shell-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 864d9c2924d08e11b4769a7a21acb7d0191ed2f6157264cab86842aa0aea2475
MD5 7b66631fcb2e888b7a300dea5de4be16
BLAKE2b-256 bc537ee1044ec145ed380d56b2a19160371cc47439830880d5562b51559b66a4

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