PyOCI Publish and download (private) python packages using an OCI registry for storage. Why PyOCI To not have to rely on yet-another-cloud-provider for private Python packages, PyOCI, makes ghcr.io act like a python index. In addition, this completely removes the need for separate access management as GitHub Packages access control applies. Most subscriptions with cloud providers include an OCI (docker image) registry where private containers can be published and distributed from. PyOCI allows using any (private) OCI registry as a python package index, as long as it implements the OCI distribution specification. It acts as a proxy between pip and the OCI registry. An instance of PyOCI is available at https://pyoci.com, to use this proxy, please see the Getting started. Tested registries: Published packages will show up in the OCI registry UI: Getting started To install a package with pip using PyOCI: pip install --index-url="http://<username>:<password>@<pyoci-url>/<OCI-registry-url>/<namespace>/" <package-name> <pyoci-url> : https://pyoci.com : https://pyoci.com <OCI-registry-url> : URL of the OCI registry to use. : URL of the OCI registry to use. <namespace> : namespace within the registry, for most registries this is the username or organization name. Example installing package hello-world from organization allexveldman using ghcr.io as the registry: pip install --index-url="https://$GITHUB_USER:$GITHUB_TOKEN@pyoci.com/ghcr.io/allexveldman/" hello-world Warning If the package contains dependencies from regular pypi, these will not resolve. Pip does not have a proper way of indicating you only want to resolve <package-name> through PyOCI and it's dependencies through pypi. Poetry does provide you with a way to do this. As does uv. For more examples, including how to publish a package, see the examples. Host your own If you don't want, or can't, use https://pyoci.com, you can host your own using the docker container. docker run ghcr.io/allexveldman/pyoci:latest Not...
First seen: 2025-10-03 05:51
Last seen: 2025-10-03 10:52