rolldeep opened a new pull request #34:
URL: https://github.com/apache/airflow-client-python/pull/34
When you try to get variables, you have ApiValueError.
I propose a fix for that.
Here is the example code:
```Python
import getpass
import json
import socket
import airflow_client.client
import etl.utils.templates.variable as variable
from airflow_client import client
from airflow_client.client.api import variable_api
from airflow_client.client.model.variable import Variable
local_user = input("Enter Local Airflow Admin username: ")
local_pass = getpass.getpass("Enter Local Airflow Admin password: ")
local_host = socket.gethostbyname(socket.gethostname())
configuration = airflow_client.client.Configuration(
host=f"{local_host}:8080/api/v1",
username=local_user,
password=local_pass)
with client.ApiClient(configuration) as api_client:
variable_key = "NewVar"
var_api_instance = variable_api.VariableApi(api_client)
vars = var_api_instance.get_variables() # raise ApiValueError
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]