// This file is autogenerated, DO NOT EDIT
// aggregations/bucket/ipprefix-aggregation.asciidoc:219

[source, python]
----
resp = client.search(
    index="network-traffic",
    size=0,
    aggs={
        "ipv4-subnets": {
            "ip_prefix": {
                "field": "ipv4",
                "prefix_length": 24,
                "keyed": True
            }
        }
    },
)
print(resp)
----
