// This file is autogenerated, DO NOT EDIT
// docs/update.asciidoc:141

[source, python]
----
resp = client.update(
    index="test",
    id="1",
    script={
        "source": "ctx._source.tags.add(params.tag)",
        "lang": "painless",
        "params": {
            "tag": "blue"
        }
    },
)
print(resp)
----
