{"id":13344122,"url":"https://github.com/rssanders3/airflow-zip-operator-plugin","last_synced_at":"2025-03-12T06:31:14.144Z","repository":{"id":80708764,"uuid":"85875495","full_name":"rssanders3/airflow-zip-operator-plugin","owner":"rssanders3","description":"A plugin to Apache Airflow to allow you to run Zip and UnZip commands as an Operator","archived":false,"fork":false,"pushed_at":"2023-07-26T13:00:16.000Z","size":9,"stargazers_count":12,"open_issues_count":1,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-24T16:50:54.423Z","etag":null,"topics":["airflow","operator","unzip","zip"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rssanders3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-22T20:58:24.000Z","updated_at":"2023-04-21T07:20:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"30bf01bb-0e6a-4dd7-90f1-3c247f9e86b6","html_url":"https://github.com/rssanders3/airflow-zip-operator-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rssanders3%2Fairflow-zip-operator-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rssanders3%2Fairflow-zip-operator-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rssanders3%2Fairflow-zip-operator-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rssanders3%2Fairflow-zip-operator-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rssanders3","download_url":"https://codeload.github.com/rssanders3/airflow-zip-operator-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243171639,"owners_count":20247878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airflow","operator","unzip","zip"],"created_at":"2024-07-29T19:32:27.704Z","updated_at":"2025-03-12T06:31:14.135Z","avatar_url":"https://github.com/rssanders3.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# airflow-zip-operator-plugin\n\n## Description\n\nA plugin to Apache Airflow (Documentation: https://pythonhosted.org/airflow/, Source Code: https://github.com/apache/incubator-airflow) to allow you to run Zip and UnZip commands as an Operator from Workflows\n\n## TODO List\n\n* Print out metrics about zip file (compression, size, etc)\n* Test extensively\n\n## How do Deploy\n\n1. Copy the zip_operator_plugin.py file into the Airflow Plugins directory\n\n    * The Airflow Plugins Directory is defined in the airflow.cfg file as the variable \"plugins_folder\"\n    \n    * The Airflow Plugins Directory is, by default, ${AIRFLOW_HOME}/plugins\n    \n    * You may have to create the Airflow Plugins Directory folder as it is not created by default\n    \n    * quick way of doing this:\n    \n        $ cd {AIRFLOW_PLUGINS_FOLDER}\n        $ wget https://raw.githubusercontent.com/rssanders3/airflow-zip-operator-plugin/master/zip_operator_plugin.py\n \n2. Restart the Airflow Services\n\n3. Create or Deploy DAGs which utilize the Operator\n\n4. Your done!\n\n## ZipOperator\n\n### Operator Definition\n\nclass **airflow.operators.ZipOperator**(input_file_path, output_file_path, *args, **kwargs)\n\nBases: **airflow.operators.BaseOperator**\n\nAn operator which takes in a path to a file and zips the contents to a location you define. \n\nParameters:\n\n* **path_to_file_to_zip** (string) - Full path to the file you want to Zip\n* **path_to_save_zip** (string) - Full path to where you want to save the Zip file\n\n### Example\n\n    ```\n    from airflow.operators import ZipOperator\n    \n    zip_task = ZipOperator(\n        task_id='zip_task',\n        path_to_file_to_zip=\"/path/to/file\",\n        path_to_save_zip=\"/path/to/file.zip\",\n        dag=dag)\n    ```\n\n## UnzipOperator\n\n\n### Operator Definition\n\nclass **airflow.operators.UnzipOperator**(input_file_path, output_file_path, *args, **kwargs)\n\nBases: **airflow.operators.BaseOperator**\n\nAn operator which takes in a path to a zip file and unzips the contents to a location you define. \n\nParameters:\n\n* **path_to_zip_file** (string) - Full path to the zip file you want to Unzip\n* **path_to_unzip_contents** (string) - Full path to where you want to save the contents of the Zip file you're Unzipping\n\n### Example\n\n    ```\n    from airflow.operators import UnzipOperator\n    \n    unzip_task = UnzipOperator(\n        task_id='unzip_task',\n        path_to_zip_file=\"/path/to/file.zip\",\n        path_to_unzip_contents=\"/path/to/unzip/to/\",\n        dag=dag)\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frssanders3%2Fairflow-zip-operator-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frssanders3%2Fairflow-zip-operator-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frssanders3%2Fairflow-zip-operator-plugin/lists"}