parameters: (database, name)
return_statement: return metadata
docstring: Extract infos (description, url) from the local database
docstring_summary: Extract infos (description, url) from the local database
docstring_tokens: Extract infos ( description url ) from the local database
function: def get_package_metadata(database, name):
      """Extract infos (description, url) from the local database"""
      # Note: we could use the PyPI database but this has been written on 
      # machine which is not connected to the internet
      db = cp.ConfigParser()
      db.readfp(open(osp.join(DATA_PATH, database)))
      metadata = dict(description='', url='http://pypi.python.org/pypi/' + name)
      for key in metadata:
          name1 = name.lower()
          for name2 in (name1, name1.split('-')[0]):
              try:
                  metadata[key] = db.get(name2, key)
                  break
              except (cp.NoSectionError, cp.NoOptionError):
                  pass
      return metadata
function_tokens: def get_package_metadata ( database , name ) : # Note: we could use the PyPI database but this has been written on  # machine which is not connected to the internet db = cp . ConfigParser ( ) db . readfp ( open ( osp . join ( DATA_PATH , database ) ) ) metadata = dict ( description = '' , url = 'http://pypi.python.org/pypi/' + name ) for key in metadata : name1 = name . lower ( ) for name2 in ( name1 , name1 . split ( '-' ) [ 0 ] ) : try : metadata [ key ] = db . get ( name2 , key ) break except ( cp . NoSectionError , cp . NoOptionError ) : pass return metadata