// This file is autogenerated, DO NOT EDIT
// ingest/processors/geoip.asciidoc:85

[source, python]
----
resp = client.ingest.put_pipeline(
    id="geoip",
    description="Add ip geolocation info",
    processors=[
        {
            "geoip": {
                "field": "ip"
            }
        }
    ],
)
print(resp)

resp1 = client.index(
    index="my-index-000001",
    id="my_id",
    pipeline="geoip",
    document={
        "ip": "89.160.20.128"
    },
)
print(resp1)

resp2 = client.get(
    index="my-index-000001",
    id="my_id",
)
print(resp2)
----
