check_pypi_name¶
-
check_pypi_name.
check_pypi_name
(pypi_package_name, pypi_registry_host=None)[source]¶ Check if a package name exists on pypi.
- TODO: Document the Registry URL construction.
- It may not be obvious how pypi_package_name and pypi_registry_host are used I’m appending the simple HTTP API parts of the registry standard specification.
- It will return True if the package name, or any equivalent variation as defined by PEP 503 normalisation
- rules (https://www.python.org/dev/peps/pep-0503/#normalized-names) is registered in the PyPI registry.
>>> check_pypi_name('pip') True >>> check_pypi_name('Pip') True
- It will return False if the package name, or any equivalent variation as defined by PEP 503 normalisation
- rules (https://www.python.org/dev/peps/pep-0503/#normalized-names) is not registered in the PyPI registry.
>>> check_pypi_name('testy_mc-test_case-has.a.cousin_who_should_never_write_a_package') False
Parameters: - pypi_package_name –
- pypi_registry_host –
Returns: