Print( 'Getting Tasks successful')ĭag_run_api_instance = dag_run_api. Print( "Exception when calling DagAPI->get_tasks: %s \n" % e) Print( 'Getting DAG list successful')Īpi_response = dag_api_instance. Print( "Exception when calling DagAPI->get_dags: %s \n" % e) DAGApi( api_client)Īpi_response = dag_api_instance. ApiClient( configuration) as api_client:Įrrors = False print( 'Getting DAG list')ĭag_api_instance = dag_api. # Make sure in the section, the `load_examples` config is set to True in your airflow.cfg # or AIRFLOW_CORE_LOAD_EXAMPLES environment variable set to True DAG_ID = "example_bash_operator" # Enter a context with an instance of the API client with airflow_client. In the `` section of your `airflow.cfg` set: # auth_backend = .session.basic_auth # Make sure that your user/name are configured properly - using the user/password that has admin # privileges in Airflow # Configure HTTP basic authorization: Basic configuration = airflow_client. # In case of the basic authentication below, make sure that Airflow is # configured also with the basic_auth as backend additionally to regular session backend needed # by the UI. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. dag_run import DAGRun # The client must use the authentication and authorization parameters # in accordance with the API server security policy. api import config_api, dag_api, dag_run_api from airflow_client. Please install rich to get colored output: `pip install rich`") # If you have rich installed, you will have nice colored output of the API responses from rich import print except ImportError: Rendered in README in `pypi` package documentation (currentlyįollowing the links to other filess in the repo there fails. Link in README have been changed to URL so that they are properly Updated to reflect all the changes, as well as it has beenĮxposed in Project_URL of the package in PyPI. Minimum version of Python have been set to 3.7 and CHANGELOG was Where we are using it to run the tests with the API. Pre-commit) to make sure it is the same in the README and in dev We are now updating the API documentation and examples to show thatĪlso the examples have been refrehsed and modernized a bit as wellĪs the dev example has been synchronized automatically (via We've recently clarified that those properties are read-only and Properties, which could mislead our users. Which was a bug, and some of our "dev" examples set the read only Specifically DAGRun dag_id has not been marked as read-only so far Refresh README, examples and changelog with recent changes ( #78 ) This PR refreshes README, examples of our and changelog to betterĮmphasise recent changes in the validation/open API of oursĬlarifying read-only properties in our API.
0 Comments
Leave a Reply. |