def resolveHostName(resolutionReceiver, hostName, portNumber=0,
                        addressTypes=None, transportSemantics='TCP'):
        """
        Initiate a hostname resolution.

        @param resolutionReceiver: an object that will receive each resolved
            address as it arrives.
        @type resolutionReceiver: L{IResolutionReceiver}

        @param hostName: The name of the host to resolve.  If this contains
            non-ASCII code points, they will be converted to IDNA first.
        @type hostName: L{unicode}

        @param portNumber: The port number that the returned addresses should
            include.
        @type portNumber: L{int} greater than or equal to 0 and less than 65536

        @param addressTypes: An iterable of implementors of L{IAddress} that
            are acceptable values for C{resolutionReceiver} to receive to its
            L{addressResolved <IResolutionReceiver.addressResolved>}.  In
            practice, this means an iterable containing
            L{twisted.internet.address.IPv4Address},
            L{twisted.internet.address.IPv6Address}, both, or neither.
        @type addressTypes: L{collections.abc.Iterable} of L{type}

        @param transportSemantics: A string describing the semantics of the
            transport; either C{'TCP'} for stream-oriented transports or
            C{'UDP'} for datagram-oriented; see
            L{twisted.internet.address.IPv6Address.type} and
            L{twisted.internet.address.IPv4Address.type}.
        @type transportSemantics: native L{str}

        @return: The resolution in progress.
        @rtype: L{IResolutionReceiver}
        """

        Initiate a hostname resolution.

        @param resolutionReceiver: an object that will receive each resolved
            address as it arrives.
        @type resolutionReceiver: L{IResolutionReceiver}

        @param hostName: The name of the host to resolve.  If this contains
            non-ASCII code points, they will be converted to IDNA first.
        @type hostName: L{unicode}

        @param portNumber: The port number that the returned addresses should
            include.
        @type portNumber: L{int} greater than or equal to 0 and less than 65536

        @param addressTypes: An iterable of implementors of L{IAddress} that
            are acceptable values for C{resolutionReceiver} to receive to its
            L{addressResolved <IResolutionReceiver.addressResolved>}.  In
            practice, this means an iterable containing
            L{twisted.internet.address.IPv4Address},
            L{twisted.internet.address.IPv6Address}, both, or neither.
        @type addressTypes: L{collections.abc.Iterable} of L{type}

        @param transportSemantics: A string describing the semantics of the
            transport; either C{'TCP'} for stream-oriented transports or
            C{'UDP'} for datagram-oriented; see
            L{twisted.internet.address.IPv6Address.type} and
            L{twisted.internet.address.IPv4Address.type}.
        @type transportSemantics: native L{str}

        @return: The resolution in progress.
        @rtype: L{IResolutionReceiver}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/interfaces.py