original_docstring: Delete a DAG File from Airflow
docstring: Delete a DAG File from Airflow
docstring_tokens: Delete a DAG File from Airflow
code: def delete(self):
          """Delete a DAG File from Airflow"""
          args = self.delete_parser.parse_args()
          filename = args.get(FILE_KEY)
          filepath = os.path.join(settings.DAGS_FOLDER, filename)
  
          allowed_file(filename)
          check_for_file(filepath)
  
          os.unlink(filepath)
          return Response(status=DELETE_RESPONSE_SUCCESS_CODE)
code_tokens: def delete ( self ) : args = self . delete_parser . parse_args ( ) filename = args . get ( FILE_KEY ) filepath = os . path . join ( settings . DAGS_FOLDER , filename ) allowed_file ( filename ) check_for_file ( filepath ) os . unlink ( filepath ) return Response ( status = DELETE_RESPONSE_SUCCESS_CODE )
short_docstring: Delete a DAG File from Airflow
short_docstring_tokens: Delete a DAG File from Airflow
comment: """Delete a DAG File from Airflow"""