airphin


Nameairphin JSON
Version 0.0.11 PyPI version JSON
download
home_pagehttps://github.com/WhaleOps/airphin
SummaryAirphin is a tool for migrating Airflow DAGs to DolphinScheduler Python API.
upload_time2023-02-08 08:29:04
maintainer
docs_urlNone
authorJay Chung
requires_python>=3.6
licenseApache License 2.0
keywords all
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # Airphin

[![PyPi Version](https://img.shields.io/pypi/v/airphin.svg?style=flat-square&logo=PyPi)](https://pypi.org/project/airphin/)
[![PyPi Python Versions](https://img.shields.io/pypi/pyversions/airphin.svg?style=flat-square&logo=python)](https://pypi.org/project/airphin/)
[![PyPi License](https://img.shields.io/:license-Apache%202-blue.svg?style=flat-square)](https://raw.githubusercontent.com/WhaleOps/airphin/main/LICENSE)
[![PyPi Status](https://img.shields.io/pypi/status/airphin.svg?style=flat-square)](https://pypi.org/project/airphin/)
[![Downloads](https://pepy.tech/badge/airphin/month)](https://pepy.tech/project/airphin)
[![Coverage Status](https://img.shields.io/codecov/c/github/WhaleOps/airphin/main.svg?style=flat-square)](https://codecov.io/github/WhaleOps/airphin?branch=main)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat-square&labelColor=ef8336)](https://pycqa.github.io/isort)
[![CI](https://github.com/WhaleOps/airphin/actions/workflows/ci.yaml/badge.svg)](https://github.com/WhaleOps/airphin/actions/workflows/ci.yaml)
[![Documentation Status](https://readthedocs.org/projects/airphin/badge/?version=latest)](https://airphin.readthedocs.io/en/latest/?badge=latest)

Airphin is a tool for migrating Airflow DAGs to DolphinScheduler Python API.

## Installation

For now, it just for test and without publish to pypi but will be adding in the future.
You could still install locally by yourself.

```shell
python -m pip install --upgrade airphin
```

## Quick Start

Here will give a quick example to show how to migrate base on standard input.

```shell
# Quick test the migrate rule for standard input
# Can also add option `--diff` to see the diff detail of this migrate
airphin test "from airflow.operators.bash import BashOperator

test = BashOperator(
    task_id='test',
    bash_command='echo 1',
)
"
```

And you will see the migrated result in the standard output. Airphin can only migrate standard input, it can
also migrate file, directory and even can use in your python code. For more detail, please see [our usage](https://airphin.readthedocs.io/en/latest/start.html#usage).

## Documentation

The documentation host on read the doc and is available at [https://airphin.readthedocs.io](https://airphin.readthedocs.io).

## Support Statement

For now, we support following statement from Airflow's DAG files

### DAG

| Before Migration             | After Migration                                                            |
|------------------------------|----------------------------------------------------------------------------|
| `from airflow import DAG`    | `from pydolphinscheduler.core.process_definition import ProcessDefinition` |
| `with DAG(...) as dag: pass` | `with ProcessDefinition(...) as dag: pass`                                 |

### Operators

#### Dummy Operator

| Before Migration                                             | After Migration                                               |
|--------------------------------------------------------------|---------------------------------------------------------------|
| `from airflow.operators.dummy_operator import DummyOperator` | `from pydolphinscheduler.tasks.shell import Shell`            |
| `from airflow.operators.dummy import DummyOperator`          | `from pydolphinscheduler.tasks.shell import Shell`            |
| `dummy = DummyOperator(...)`                                 | `dummy = Shell(..., command="echo 'airflow dummy operator'")` |

#### Shell Operator

| Before Migration                                  | After Migration                                    |
|---------------------------------------------------|----------------------------------------------------|
| `from airflow.operators.bash import BashOperator` | `from pydolphinscheduler.tasks.shell import Shell` |
| `bash = BashOperator(...)`                        | `bash = Shell(...)`                                |

#### Spark Sql Operator

| Before Migration                                                    | After Migration                                |
|---------------------------------------------------------------------|------------------------------------------------|
| `from airflow.operators.spark_sql_operator import SparkSqlOperator` | `from pydolphinscheduler.tasks.sql import Sql` |
| `spark = SparkSqlOperator(...)`                                     | `spark = Sql(...)`                             |

#### Python Operator

| Before Migration                                               | After Migration                                      |
|----------------------------------------------------------------|------------------------------------------------------|
| `from airflow.operators.python_operator import PythonOperator` | `from pydolphinscheduler.tasks.python import Python` |
| `python = PythonOperator(...)`                                 | `python = Python(...)`                               |

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/WhaleOps/airphin",
    "name": "airphin",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "all",
    "author": "Jay Chung",
    "author_email": "zhongjiajie955@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2b/c2/d352351202624a79dc361539e243a94507c580bf001da0939f979035a134/airphin-0.0.11.tar.gz",
    "platform": null,
    "description": "# Airphin\n\n[![PyPi Version](https://img.shields.io/pypi/v/airphin.svg?style=flat-square&logo=PyPi)](https://pypi.org/project/airphin/)\n[![PyPi Python Versions](https://img.shields.io/pypi/pyversions/airphin.svg?style=flat-square&logo=python)](https://pypi.org/project/airphin/)\n[![PyPi License](https://img.shields.io/:license-Apache%202-blue.svg?style=flat-square)](https://raw.githubusercontent.com/WhaleOps/airphin/main/LICENSE)\n[![PyPi Status](https://img.shields.io/pypi/status/airphin.svg?style=flat-square)](https://pypi.org/project/airphin/)\n[![Downloads](https://pepy.tech/badge/airphin/month)](https://pepy.tech/project/airphin)\n[![Coverage Status](https://img.shields.io/codecov/c/github/WhaleOps/airphin/main.svg?style=flat-square)](https://codecov.io/github/WhaleOps/airphin?branch=main)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat-square&labelColor=ef8336)](https://pycqa.github.io/isort)\n[![CI](https://github.com/WhaleOps/airphin/actions/workflows/ci.yaml/badge.svg)](https://github.com/WhaleOps/airphin/actions/workflows/ci.yaml)\n[![Documentation Status](https://readthedocs.org/projects/airphin/badge/?version=latest)](https://airphin.readthedocs.io/en/latest/?badge=latest)\n\nAirphin is a tool for migrating Airflow DAGs to DolphinScheduler Python API.\n\n## Installation\n\nFor now, it just for test and without publish to pypi but will be adding in the future.\nYou could still install locally by yourself.\n\n```shell\npython -m pip install --upgrade airphin\n```\n\n## Quick Start\n\nHere will give a quick example to show how to migrate base on standard input.\n\n```shell\n# Quick test the migrate rule for standard input\n# Can also add option `--diff` to see the diff detail of this migrate\nairphin test \"from airflow.operators.bash import BashOperator\n\ntest = BashOperator(\n    task_id='test',\n    bash_command='echo 1',\n)\n\"\n```\n\nAnd you will see the migrated result in the standard output. Airphin can only migrate standard input, it can\nalso migrate file, directory and even can use in your python code. For more detail, please see [our usage](https://airphin.readthedocs.io/en/latest/start.html#usage).\n\n## Documentation\n\nThe documentation host on read the doc and is available at [https://airphin.readthedocs.io](https://airphin.readthedocs.io).\n\n## Support Statement\n\nFor now, we support following statement from Airflow's DAG files\n\n### DAG\n\n| Before Migration             | After Migration                                                            |\n|------------------------------|----------------------------------------------------------------------------|\n| `from airflow import DAG`    | `from pydolphinscheduler.core.process_definition import ProcessDefinition` |\n| `with DAG(...) as dag: pass` | `with ProcessDefinition(...) as dag: pass`                                 |\n\n### Operators\n\n#### Dummy Operator\n\n| Before Migration                                             | After Migration                                               |\n|--------------------------------------------------------------|---------------------------------------------------------------|\n| `from airflow.operators.dummy_operator import DummyOperator` | `from pydolphinscheduler.tasks.shell import Shell`            |\n| `from airflow.operators.dummy import DummyOperator`          | `from pydolphinscheduler.tasks.shell import Shell`            |\n| `dummy = DummyOperator(...)`                                 | `dummy = Shell(..., command=\"echo 'airflow dummy operator'\")` |\n\n#### Shell Operator\n\n| Before Migration                                  | After Migration                                    |\n|---------------------------------------------------|----------------------------------------------------|\n| `from airflow.operators.bash import BashOperator` | `from pydolphinscheduler.tasks.shell import Shell` |\n| `bash = BashOperator(...)`                        | `bash = Shell(...)`                                |\n\n#### Spark Sql Operator\n\n| Before Migration                                                    | After Migration                                |\n|---------------------------------------------------------------------|------------------------------------------------|\n| `from airflow.operators.spark_sql_operator import SparkSqlOperator` | `from pydolphinscheduler.tasks.sql import Sql` |\n| `spark = SparkSqlOperator(...)`                                     | `spark = Sql(...)`                             |\n\n#### Python Operator\n\n| Before Migration                                               | After Migration                                      |\n|----------------------------------------------------------------|------------------------------------------------------|\n| `from airflow.operators.python_operator import PythonOperator` | `from pydolphinscheduler.tasks.python import Python` |\n| `python = PythonOperator(...)`                                 | `python = Python(...)`                               |\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Airphin is a tool for migrating Airflow DAGs to DolphinScheduler Python API.",
    "version": "0.0.11",
    "split_keywords": [
        "all"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7d862d1a0107ccdb67d0e873ec2f85bfddb0b5e5967d085121307eaeecc084de",
                "md5": "10e3713fea6f0af72242952029425a59",
                "sha256": "0187fcdd40c74cb6b65699488e0625e6f4a47b4d7b50da4404a234647dcbab5a"
            },
            "downloads": -1,
            "filename": "airphin-0.0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "10e3713fea6f0af72242952029425a59",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 20417,
            "upload_time": "2023-02-08T08:29:02",
            "upload_time_iso_8601": "2023-02-08T08:29:02.707524Z",
            "url": "https://files.pythonhosted.org/packages/7d/86/2d1a0107ccdb67d0e873ec2f85bfddb0b5e5967d085121307eaeecc084de/airphin-0.0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2bc2d352351202624a79dc361539e243a94507c580bf001da0939f979035a134",
                "md5": "af86ee3133345e1c1567878c01624f85",
                "sha256": "5d68d1abd83dc39bc91cce46e845ff645783311fa2e76af553de0432b6123b62"
            },
            "downloads": -1,
            "filename": "airphin-0.0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "af86ee3133345e1c1567878c01624f85",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 16535,
            "upload_time": "2023-02-08T08:29:04",
            "upload_time_iso_8601": "2023-02-08T08:29:04.202420Z",
            "url": "https://files.pythonhosted.org/packages/2b/c2/d352351202624a79dc361539e243a94507c580bf001da0939f979035a134/airphin-0.0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-08 08:29:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "WhaleOps",
    "github_project": "airphin",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "airphin"
}
        
Elapsed time: 0.09290s