is not known, and the port is not provided, this attribute will be set to None. >>> URL.from_text(u'http://example.com/pa/th').port 80 >>> URL.from_text(u'foo://example.com/pa/th').port >>> URL.from_text(u'foo://example.com:8042/pa/th').port 8042 .. note:: Per the standard, when the port is the same as the schemes default port, it will be omitted in the text URL. )