class_docstr: Specify package indexes/Python package sources using Airflow connections.
class_docstr_tok: ["Specify","package","indexes\/Python","package","sources","using","Airflow","connections","."]
docstr: Return a connection URL with embedded credentials.
docstr_tok: ["Return","a","connection","URL","with","embedded","credentials","."]
code: def get_connection_url(self) -> Any:
      """Return a connection URL with embedded credentials."""
      conn = self.get_connection(self.pi_conn_id)
      index_url = conn.host
      if not index_url:
          raise Exception("Please provide an index URL.")
      return self._get_basic_auth_conn_url(
          index_url, conn.login, conn.password
      )
  
file_path: airflow/airflow/hooks/package_index.py
imports: from __future__ import annotations
  import subprocess
  from typing import Any
  from urllib.parse import quote, urlparse
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 5 for calling the PackageIndexHook obj's underlying member method code with example usage: obj.get_connection_url() and returns: self