Skip to main content

No project description provided

Project description

Flytekit Custom Plugins

This repository contains multiple custom Flytekit plugins for demonstrating user-defined tasks.

Table of Contents

Introduction

This project demonstrates how to create custom plugins for Flytekit using Python. Flytekit is a Python SDK for defining, deploying, and managing data and ML workflows on Flyte. The custom plugins in this repository extend Flytekit's capabilities by adding new tasks.

Installation

To install the package and its dependencies, use the following command:

pip install .

Development Installation

pip install .[dev]

Project Structure

flytekit-custom-plugins/ ├── README.md ├── pyproject.toml ├── src/ │ ├── init.py │ ├── plugin_one/ │ │ ├── init.py │ │ ├── custom_task_one.py │ ├── plugin_two/ │ │ ├── init.py │ │ ├── custom_task_two.py └── tests/ ├── init.py ├── test_plugin_one.py ├── test_plugin_two.py

File overview

  1. README.md: Project documentation.
  2. pyproject.toml: Configuration file for project metadata, dependencies, and build system.
  3. src/: Source code directory.
  4. plugin_one/: Contains the first custom plugin.
  5. custom_task_one.py: Implementation of the first custom task.
  6. plugin_two/: Contains the second custom plugin.
  7. custom_task_two.py: Implementation of the second custom task.
  8. tests/: Test suite directory.
  9. test_plugin_one.py: Tests for the first custom plugin.
  10. test_plugin_two.py: Tests for the second custom plugin.

Usage

from plugin_one.custom_task_one import MyCustomTaskOne
from plugin_two.custom_task_two import MyCustomTaskTwo

task_one = MyCustomTaskOne(name="example_one", some_parameter="value")
result_one = task_one.execute()
print(result_one)

task_two = MyCustomTaskTwo(name="example_two", another_parameter="value")
result_two = task_two.execute()
print(result_two)

Development Workflow

python -m venv venv
source venv/bin/activate  # On Windows, use `venv\Scripts\activate`

pip install .[dev]

Adding a New Plugin

mkdir src/plugin_three
touch src/plugin_three/__init__.py

Implement a new plugin.

Register the pluging in the toml file.

Testing

Ensure to write the tests for the plugins implmenented in the tests folder.

Run pytest in the console.

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

TestFlyte-1.0.2.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file TestFlyte-1.0.2.tar.gz.

File metadata

  • Download URL: TestFlyte-1.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.16

File hashes

Hashes for TestFlyte-1.0.2.tar.gz
Algorithm Hash digest
SHA256 5de2ba99e223ff8d25d5a62018273f4d76f011819810ce335b8bec18aa366b6c
MD5 9e8fe46de8e04460a0ecf767e4a41a8f
BLAKE2b-256 884b6cb7d77ba3e24b0d088f784d6ddef7fe92ac05b1ac4a05062a2894612dd6

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