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
- Installation
- Development Installation
- Project Structure
- Usage
- Development Workflow
- Testing
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
- README.md: Project documentation.
- pyproject.toml: Configuration file for project metadata, dependencies, and build system.
- src/: Source code directory.
- plugin_one/: Contains the first custom plugin.
- custom_task_one.py: Implementation of the first custom task.
- plugin_two/: Contains the second custom plugin.
- custom_task_two.py: Implementation of the second custom task.
- tests/: Test suite directory.
- test_plugin_one.py: Tests for the first custom plugin.
- 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
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
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5de2ba99e223ff8d25d5a62018273f4d76f011819810ce335b8bec18aa366b6c
|
|
| MD5 |
9e8fe46de8e04460a0ecf767e4a41a8f
|
|
| BLAKE2b-256 |
884b6cb7d77ba3e24b0d088f784d6ddef7fe92ac05b1ac4a05062a2894612dd6
|