parameters: (self, repo)
return_statement: return output
docstring: Provides access to the repository info that is cached in a channel
  
          :param repo:
              The URL of the repository to get the cached info of
  
          :raises:
              ProviderException: when an error occurs with the channel contents
              DownloaderException: when an error occurs trying to open a URL
  
          :return:
              A dict in the format:
              {
                  'Package Name': {
                      'name': name,
                      'description': description,
                      'author': author,
                      'homepage': homepage,
                      'last_modified': last modified date,
                      'download': {
                          'url': url,
                          'date': date,
                          'version': version
                      },
                      'previous_names': [old_name, ...],
                      'labels': [label, ...],
                      'readme': url,
                      'issues': url,
                      'donate': url,
                      'buy': url
                  },
                  ...
              }
docstring_summary: Provides access to the repository info that is cached in a channel
docstring_tokens: Provides access to the repository info that is cached in a channel
function: def get_packages(self, repo):
          """
          Provides access to the repository info that is cached in a channel
  
          :param repo:
              The URL of the repository to get the cached info of
  
          :raises:
              ProviderException: when an error occurs with the channel contents
              DownloaderException: when an error occurs trying to open a URL
  
          :return:
              A dict in the format:
              {
                  'Package Name': {
                      'name': name,
                      'description': description,
                      'author': author,
                      'homepage': homepage,
                      'last_modified': last modified date,
                      'download': {
                          'url': url,
                          'date': date,
                          'version': version
                      },
                      'previous_names': [old_name, ...],
                      'labels': [label, ...],
                      'readme': url,
                      'issues': url,
                      'donate': url,
                      'buy': url
                  },
                  ...
              }
          """
  
          self.fetch()
  
          # The 2.0 channel schema renamed the key cached package info was
          # stored under in order to be more clear to new users.
          packages_key = 'packages_cache' if self.schema_version >= 2.0 else 'packages'
  
          if self.channel_info.get(packages_key, False) == False:
              return {}
  
          if self.channel_info[packages_key].get(repo, False) == False:
              return {}
  
          output = {}
          for package in self.channel_info[packages_key][repo]:
              copy = package.copy()
  
              # In schema version 2.0, we store a list of dicts containing info
              # about all available releases. These include "version" and
              # "platforms" keys that are used to pick the download for the
              # current machine.
              if self.schema_version >= 2.0:
                  copy = self.select_release(copy)
              else:
                  copy = self.select_platform(copy)
  
              if not copy:
                  self.unavailable_packages.append(package['name'])
                  continue
  
              output[copy['name']] = copy
  
          return output
function_tokens: def get_packages ( self , repo ) : self . fetch ( ) # The 2.0 channel schema renamed the key cached package info was # stored under in order to be more clear to new users. packages_key = 'packages_cache' if self . schema_version >= 2.0 else 'packages' if self . channel_info . get ( packages_key , False ) == False : return { } if self . channel_info [ packages_key ] . get ( repo , False ) == False : return { } output = { } for package in self . channel_info [ packages_key ] [ repo ] : copy = package . copy ( ) # In schema version 2.0, we store a list of dicts containing info # about all available releases. These include "version" and # "platforms" keys that are used to pick the download for the # current machine. if self . schema_version >= 2.0 : copy = self . select_release ( copy ) else : copy = self . select_platform ( copy ) if not copy : self . unavailable_packages . append ( package [ 'name' ] ) continue output [ copy [ 'name' ] ] = copy return output