Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

How to self-host a Python package index using Pulp

January 17, 2022
Fridolin Pokorny Ina Panova Fabricio Aguiar Harshad Reddy Nalla
Related topics:
Artificial intelligenceData scienceLinuxPython
Related products:
Red Hat Enterprise Linux

    Every Python developer or data scientist gets to the point where they need to consume, and often publish, Python packages. The main source of open source, publicly available Python packages is PyPI. Used worldwide, PyPI hosts 3 million Python package releases as of this writing. In some cases, however, your team might need to host a Python package index internally. This article introduces Pulp, an open source project for managing repositories of software packages. Our example shows how the Pulp instance works on the Operate First environment where it is hosted. Our example is based on how data scientists and Python developers at Red Hat use the Operate First deployment.

    Managing software repositories with Pulp

    Pulp can manage content in various formats: RPM packages, container images, Ansible roles, Maven repositories, Python package indexes, and others. See Pulp's content plugins documentation for a full listing.

    From a Python packaging perspective, you are likely most interested in the Python content plugin, which you can use to create and host multiple Python package indexes on a single Pulp instance. This perfectly fits into a scenario where multiple teams wish to manage their own Python package index, but may need to operate just one Pulp instance (or very few instances) deployed within the organization.

    Because Pulp is supported by Red Hat engineers and is modular, our teams within Red Hat decided to use Pulp to host our Python packages. The Pulp Python package index is deployed in the Operate First production environment. We'll use that as our example for using a Pulp instance as a Python package index.

    How to use the Pulp Python package index

    The documentation at the Operate First index's site walks you through setting up a Python package index, publishing Python packages, and consuming already hosted Python packages from the Pulp Python package index. Let's look at the main functions of using Pulp.

    Setting up a Pulp Python repository

    To set up a repository, submit a request to the Operate First support team, as shown in Figure 1. After your request is processed, the instance and the access to it will be configured and ready for use.

    Submit a request for a new repository.
    Figure 1. Submit a request for a new repository.

    Publishing Python packages

    After your private index has been set up, you can publish Python packages there. Currently, you need to follow the steps documented in Project Thoth's hello world example application. Eventually, we hope that role-based access control (RBAC) will be enabled.

    Consuming Python packages from a Pulp Python package index

    With a simple command, you can consume the packages hosted on the Operate First cloud:

    $ pip install --index-url "https://pulp.operate-first.cloud/pypi/<index-name>/simple/" --extra-index-url "https://pypi.org/simple"

    Note: By including the --extra-index-url option, you can ask pip to fall back on PyPI to retrieve packages that are not found on the specified private index.

    Acknowledgments

    The Pulp instance on the Operate First environment is live and available to developers after 10 months of cross-team collaboration between engineers from the Pulp team, the Project Thoth team, the team supporting the Operate First deployments, and Python engineers who were involved during the process.

    We would like to thank everyone who was part of this effort. Thanks, especially, to the following engineers who were actively involved in the collaboration:

    • Bob Fahr, Insights-core team
    • Brian Gollaher, Red Hat Enterprise Linux Product Management
    • Chris Hambridge, Ansible Engineering
    • Christoph Goern, Project Thoth
    • Christian Heimes, Red Hat Identity Management, CPython upstream, Python Packaging Authority
    • Daniel Alley, Pulp project
    • Gerrod Ubben, Pulp project
    • Pavel Tisnovsky, Connected Customer Experience (CCX)
    • Sviatoslav Sydorenko, Ansible Core Engineering, Python Packaging Authority
    • Tomas Orsava, Python maintenance team
    • Tom Coufal, Open Services Team
    Last updated: September 26, 2024

    Related Posts

    • Build your first Python application in a Linux container

    • More machine learning with OpenShift Data Science

    Recent Posts

    • Every layer counts: Defense in depth for AI agents with Red Hat AI

    • Fun in the RUN instruction: Why container builds with distroless images can surprise you

    • Trusted software factory: Building trust in the agentic AI era

    • Build a zero trust AI pipeline with OpenShift and RHEL CVMs

    • Red Hat Hardened Images: Top 5 benefits for software developers

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.