airflow_pydantic.Variable

pydantic model airflow_pydantic.Variable[source]

Bases: BaseModel

Show JSON schema
{
   "title": "Variable",
   "type": "object",
   "properties": {
      "key": {
         "description": "Variable key",
         "title": "Key",
         "type": "string"
      },
      "_val": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "",
         "description": "Variable value",
         "title": "Val"
      },
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "",
         "description": "Variable description",
         "title": "Description"
      },
      "is_encrypted": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "description": "Whether the variable is encrypted",
         "title": "Is Encrypted"
      },
      "deserialize_json": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "description": "Whether to deserialize JSON",
         "title": "Deserialize Json"
      }
   },
   "required": [
      "key"
   ]
}

Fields:
  • description (str | None)

  • deserialize_json (bool | None)

  • is_encrypted (bool | None)

  • key (str)

  • val (str | None)

field key: str [Required]

Variable key

field val: str | None = '' (alias '_val')

Variable value

field description: str | None = ''

Variable description

field is_encrypted: bool | None = False

Whether the variable is encrypted

field deserialize_json: bool | None = False

Whether to deserialize JSON

get()[source]