def register(self, metadata):
self.check_credentials()<EOL>metadata.validate()<EOL>d = metadata.todict()<EOL>d['<STR_LIT>'] = '<STR_LIT>'<EOL>request = self.encode_request(d.items(), [])<EOL>response = self.send_request(request)<EOL>d['<STR_LIT>'] = '<STR_LIT>'<EOL>request = self.encode_request(d.items(), [])<EOL>return self.send_request(request)<EOL>
Register a distribution on PyPI, using the provided metadata.

:param metadata: A :class:`Metadata` instance defining at least a name
                 and version number for the distribution to be
                 registered.
:return: The HTTP response received from PyPI upon submission of the
        request.