Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A simple plugin system for Airflow #32

Merged
merged 1 commit into from
Jun 17, 2015
Merged

A simple plugin system for Airflow #32

merged 1 commit into from
Jun 17, 2015

Conversation

mistercrunch
Copy link
Member

Check out the docs entry for details

"""
Authentication is implemented using flask_login and different environments can
implement their own login mechanisms by providing an `airflow_login` module
in their PYTHONPATH. airflow_login should be based off the
`airflow.www.login`
"""
__version__ = "1.0.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe minor bump in the version?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I bump as part of the process when I decide to upload to pypi

@artwr
Copy link
Contributor

artwr commented Jun 15, 2015

Sweet, sweet plugins!

@mistercrunch mistercrunch force-pushed the plugins branch 2 times, most recently from d11cb6f to 001eadb Compare June 16, 2015 22:19
mistercrunch added a commit that referenced this pull request Jun 17, 2015
A simple plugin system for Airflow
@mistercrunch mistercrunch merged commit e84be5d into master Jun 17, 2015
@mistercrunch mistercrunch deleted the plugins branch June 17, 2015 00:13
@Yongyiw
Copy link

Yongyiw commented Oct 13, 2015

Is it possible to put different hooks/operators/macros in different directories instead of in one file?

@mistercrunch
Copy link
Member Author

@Yongyiw , yes, totally. Within your main plugin file you can import other python modules and associate their content to your AirflowPlugin

@Yongyiw
Copy link

Yongyiw commented Oct 13, 2015

@mistercrunch It works for me. Thanks a lot!

For future convenience, what i have done is

  1. Created empty files named __init__.py in plugins directory and its sub-directories eg. hooks, operators, etc....

  2. In AirflowPlugin type:

     from hooks.your_customized_hook import YourCustomizedHook
     from operators.your_customized_operator import YourCustomizedOperator

Details about python-how-to-import-the-class-within-the-same-directory-or-sub-directory

boralyl pushed a commit to upsight/airflow that referenced this pull request Apr 1, 2019
…A-4104 to develop

* commit 'f68a13be3af6eab969345b6149ff6365f24eaa0c':
  DATA-4104 limiting sqlalchemy version
mobuchowski pushed a commit to mobuchowski/airflow that referenced this pull request Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants