Packages you upload are hosted here. Anything else is fetched from PyPI the first time it is installed, then kept on this server.
{{ cmd_base }} package-name
{{ copy_button('cmd-main') }}
{{ '{:,}'.format(snapshot.packages|length) }} package{{ '' if snapshot.packages|length == 1 else 's' }}, {{ '{:,}'.format(snapshot.total_files) }} file{{ '' if snapshot.total_files == 1 else 's' }}, {{ snapshot.total_size|filesize }} on disk
{% endif %}| Version | Source | ||||
|---|---|---|---|---|---|
| {{ p.name }} | {{ p.latest or '–' }} | {{ source_marks(p.sources) }} | {{ p.files|length }} | {{ p.total_size|filesize }} |
Upload a package with twine, or install anything through this index. Packages found on PyPI are cached on first use.
Point pip at this server once, and every install goes through it.
pip config set global.index-url {{ pip_index_url }}{% if trusted_host %}
pip config set global.trusted-host {{ trusted_host }}{% endif %}{{ copy_button('code-pip-config') }}To use it for a single install instead:
{{ cmd_base }} package-name{{ copy_button('code-pip-once') }}Uploads need an account on this server. An administrator can create one with pypihub user -u NAME on the server.
twine upload --repository-url {{ base_url }}/ --username your-username dist/*{{ copy_button('code-twine') }}Or save the server in ~/.pypirc and upload by name:
[distutils]
index-servers = pypihub
[pypihub]
repository = {{ base_url }}/
username = your-username{{ copy_button('code-pypirc') }}twine upload --repository pypihub dist/*{{ copy_button('code-twine-name') }}Send one file to /upload/<package>/. curl asks for the password.
curl -u your-username -F "file=@dist/package_name-1.0.0-py3-none-any.whl" {{ base_url }}/upload/package-name/{{ copy_button('code-curl') }}