Skip to content

Install private package

Overview

In the organization level, private packages are delived among developers in internally way. So we need to understading the way to install the private packages in the secret way. (aka: sometime I call this is production way)

Methodology

Follow the following method

flowchart LR
  gh_token[GitHub Token] --> requirement[Add to requirement] --> p[aaaa]

Steps:

  • Get permissions to use package in private registry: Read permission

  • Get the token to retrive the package. The token is PAT.

  • Declare the package in the requirement file with output environement TOKEN

  • Add the PAT into the environment

  • Using package manage to install as normal (e.g: uv pip install -r requirements.txt)

For that, the use case can applied for

How to add

  • Use in the interactive shell mode

  • Build with Docker

References

https://docs.readthedocs.io/en/stable/guides/private-python-packages.html