Connection
Base URL, credentials and a reachable server.
Test /0, /32 and an outside address, rejecting IPv6 and networks with host bits set.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
from ipaddress import IPv4Address, IPv4Network
def in_prefix(address, prefix):
network = IPv4Network(prefix, strict=True)
return IPv4Address(address) in network