How do I add links under the Project Links
section of my PyPI project?
Twine is a utility for publishing Python packages to PyPI and other repositories. It provides build system independent uploads of source and binary distribution artifacts for both new and existing projects.
Use of Setup.py It primarily serves two purposes: It includes choices and metadata about the program, such as the package name, version, author, license, minimal dependencies, entry points, data files, and so on. Secondly, it serves as the command line interface via which packaging commands may be executed.
This question has been answered before but was a bit difficult to find, so hopefully this one is a bit easier.
PyPI pulls these links from the project_urls
metadata.
In your setup.py
file, call setuptools.setup()
with the project_urls
argument as a dictionary of title-url pairs.
import setuptools
project_urls = {
'Link 1': 'https://mygreatsite.com',
'Link 2': 'https://anothersite.com'
}
setuptools.setup( other_arguments, project_urls = project_urls )
If you want to know for which URL identifier which icon is used on PyPI,e.g. if you write
project_urls = {
'Twitter': 'https://twitter.com/PyScaffold',
}
you will see the Twitter bird on PyPI, e.g. https://pypi.org/project/PyScaffold/.
In order to see the available icons and when there are set, just check out this file(/warehouse/templates/packaging/detail.html
) from the PyPI source code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With