Skip to main content

Flyte SDK for Python

Project description

Flytekit

PyPI version fury.io PyPI download day PyPI download month PyPI format PyPI implementation Codecov

Python Library for easily authoring, testing, deploying, and interacting with Flyte tasks, workflows, and launch plans. To understand more about flyte refer to,

Installation

Flytekit is designed for minimal footprint, and thus some features must be installed as extras.

Base Installation

This is the lightest-weight SDK install. This installation includes everything you need to interact with Flyte.

Modules include:

  1. The full Flyte IDL and an additional model layer for easier extension of the data model.
  2. gRPC client for communicating with the platform.
  3. Implementations for authoring and extending all Flyte entities (including tasks, workflows, and launch plans).

Tools include:

  1. flyte-cli (Command-Line Interface for Interacting with the Flyte Platform)
  2. pyflyte (Command-Line tool for easing the registration of Flyte entities)
pip install flytekit

Plugin Installation

Spark

If @spark_task is to be used, one should install the spark plugin.

pip install "flytekit[spark]" for Spark 2.4.x
pip install "flytekit[spark3]" for Spark 3.x

Please note that Spark 2.4 support is deprecated and will be removed in a future release.

Schema

If Types.Schema() is to be used for computations involving large dataframes, one should install the schema extension.

pip install "flytekit[schema]"

Sidecar

If @sidecar_task is to be used, one should install the sidecar plugin.

pip install "flytekit[sidecar]"

Pytorch

If @pytorch_task is to be used, one should install the pytorch plugin.

pip install "flytekit[pytorch]"

TensorFlow

If @tensorflow_task is to be used, one should install the tensorflow plugin.

pip install flytekit[tensorflow]

Full Installation

To install all or multiple available plugins, one can specify them individually:

pip install "flytekit[sidecar,spark3,schema]"

Or install them with the all or all-spark2.4 or all-spark3 directives which will install all the plugins and a specific Spark version. Please note that all defaults to Spark 3.0 and Spark 2.4 support will be fully removed in a future release.

pip install "flytekit[all]"

Development

Recipes

$ make
Available recipes:
  setup        Install requirements
  fmt          Format code with black and isort
  lint         Run linters
  test         Run tests
  requirements Compile requirements

Setup (Do Once)

virtualenv ~/.virtualenvs/flytekit
source ~/.virtualenvs/flytekit/bin/activate
make setup

Formatting

We use black and isort to autoformat code. Run the following command to execute the formatters:

source ~/.virtualenvs/flytekit/bin/activate
make fmt

Testing

Unit Testing

source ~/.virtualenvs/flytekit/bin/activate
make test

Updating requirements

Update requirements in requirements.in (or requirements-spark3.in), or update requirements for development in dev-requirements.in. Then, validate, pin and freeze all requirements by running:

source ~/.virtualenvs/flytekit/bin/activate
make requirements

This will re-create the requirements.txt (or requirements-spark3.in) and dev-requirements.txt files which will be used for testing. You will have also have to re-run make setup to update your local environment with the updated requirements.

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

flytekit-0.16.0b1.tar.gz (308.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flytekit-0.16.0b1-py3-none-any.whl (399.3 kB view details)

Uploaded Python 3

File details

Details for the file flytekit-0.16.0b1.tar.gz.

File metadata

  • Download URL: flytekit-0.16.0b1.tar.gz
  • Upload date:
  • Size: 308.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for flytekit-0.16.0b1.tar.gz
Algorithm Hash digest
SHA256 81aec37ae12202ee27b95ef4f889bda7eefe768ed6ab8f74b095896ac921bae1
MD5 5f4a80164a697e3147906f81906f621e
BLAKE2b-256 b24234f69fc749046d4961ac3eaffe1793a1357f5c419a40f0ef8d8ea2c93371

See more details on using hashes here.

File details

Details for the file flytekit-0.16.0b1-py3-none-any.whl.

File metadata

  • Download URL: flytekit-0.16.0b1-py3-none-any.whl
  • Upload date:
  • Size: 399.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for flytekit-0.16.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 76b918783e0df896e9680502b2a2c77bcd2ee6e4fd91a42f33e6ad7c2490b853
MD5 9dfb1fbc44dd2372725efa328d0904a3
BLAKE2b-256 b3ce5fed5e50c13936e5f2ca9bc76708b90efab6a68f4af48df059f9ca04d0ea

See more details on using hashes here.

Supported by

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