'The server port as integer (read-only, use :attr:`host` to set)'

@property
def server_port(self):

    pieces = self.host.split(':', 1)
    if ((len(pieces) == 2) and pieces[1].isdigit()):
        return int(pieces[1])
    elif (self.url_scheme == 'https'):
        return 443
    return 80
