Skip to content

PyPi Package Registry


The registry supports working with:

To add a PyPi package, you need to obtain a GitFlic transport token. For instructions on obtaining the token, refer to this page.

In the documentation below, replace <gitflic_domain> with the appropriate domain, depending on the version:

  • For SaaS: registry.gitflic.ru
  • For self-hosted: localhost:8080

The domain and port for self-hosted versions may vary.

Configuration File

Add the following parameters to the ~/.pypirc file:

If the file doesn't exist, create it.

For adding packages to the company registry

[distutils]
index-servers =
    gitflic

[gitflic]
repository = https://<gitflic_domain>/company/<company_alias>/package/-/pypi
username = <username>
password = <transport_token>

For adding packages to the project registry

[distutils]
index-servers =
    gitflic

[gitflic]
repository = https://<gitflic_domain>/project/<owner_alias>/<project_alias>/package/-/pypi
username = <username>
password = <transport_token>

Publishing a Package

Run the following command to publish a package:

python3 -m twine upload --repository gitflic <path_to_package>

A successful package upload will display a message like:

Uploading my_package-0.1.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.1/5.1 MB • 00:04 • 1.3 MB/s

To view the published package, go to the Package Registry section of your project or company.

Downloading a Package

Due to pip's behavior, it's recommended to disable anonymous access in the registry settings from which you want to download packages.

Download commands:

Project level

pip install <package_name> --index-url https://<gitflic_domain>/project/<owner_alias>/<project_alias>/package/-/pypi/simple

Company level

pip install <package_name> --index-url https://<gitflic_domain>/company/<company_alias>/package/-/pypi/simple

Instance level

pip install <package_name> --index-url https://<gitflic_domain>/registry/package/-/pypi/simple

If anonymous access is disabled in the project, company, or service settings (depending on the level from which you're downloading), you need to add authentication credentials to the download command, for example:

pip install <package_name> --index-url https://<username>:<transport_token>@<gitflic_domain>/company/<company_alias>/package/-/pypi/simple

Automatic translation!

This page has been automatically translated. The text may contain inaccuracies.