def add_source(<EOL>self,<EOL>url: str,<EOL>verify_ssl: bool = True,<EOL>name: str = None,<EOL>warehouse: bool = False,<EOL>warehouse_api_url: str = None,<EOL>) -> Source:
if name:<EOL><INDENT>source = Source(<EOL>name=name, url=url, verify_ssl=verify_ssl, warehouse=warehouse, warehouse_api_url=warehouse_api_url<EOL>)<EOL><DEDENT>else:<EOL><INDENT>source = Source(url=url, verify_ssl=verify_ssl, warehouse=warehouse, warehouse_api_url=warehouse_api_url)<EOL><DEDENT>self.pipfile.meta.add_source(source)<EOL>if self.pipfile_lock:<EOL><INDENT>self.pipfile_lock.meta.add_source(source)<EOL><DEDENT>return source<EOL>
Add a package source (index) to the project.