Metadata-Version: 2.1
Name: airflow-workflows
Version: 0.1.4
Summary: Provides a powerful, Django-inspired class-based DAG syntax for Apache Airflow.
Home-page: https://github.com/maxg203/airflow-workflows
Author: Max Goodridge
Author-email: max.goodridge@hotmail.co.uk
License: apache-2.0
Download-URL: https://github.com/maxg203/airflow-workflows/archive/0.1.4.tar.gz
Description: # Workflows
        Workflows are a cleaner way of implementing DAGs using a Django-inspired class-based syntax.
        
        ## Simple Example
        Let's create a single Airflow DAG, whose name is a camelcased version of the class name, and whose operator dependencies are in the order they are defined.
        
        There is an option to override the default [`dependencies`](https://github.com/maxg203/airflow-workflows/blob/master/workflows.py#L165) method implementation to customise the dependency chain for your use case.
        
        ```python
        import workflows
        
        
        class ExampleWorkflow(workflows.Workflow):
            class Meta:
                schedule_interval = '0 9 * * *'
        
            do_something_useful = workflows.PythonOperator(
                python_callable=lambda **kwargs: print('something useful'),
            )
            something_else = workflows.PythonOperator(
                python_callable=lambda **kwargs: print('Something not useful'),
            )
        
        
        globals()[ExampleWorkflow.DAG.dag_id] = ExampleWorkflow.DAG
        ```
        
        
        ## Dynamic DAG Example
        Let's create (in this case three) DAGs, created dynamically and based on the `ExampleWorkflow` class as implemented above. In other words, they will share the same DAG metadata (so schedule in this case).
        
        ```python
        import workflows
        
        workflow_names = [
            'Test1',
            'Test2',
            'Test3',
        ]
        
        for workflow in workflow_names:
            WorkflowClass = workflows.create_workflow(
                workflow,
                base=ExampleWorkflow,
            )
            globals()[WorkflowClass.DAG.dag_id] = WorkflowClass.DAG
        ```
        
Keywords: airflow,DAG,workflows,ETL
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
