List the items for the given package.

        :param str package_keyname: The package for which to get the items.
        :returns: List of items in the package
504678
def list_items(self, package_keyname, **kwargs):
        
        get_kwargs = {}
        get_kwargs['mask'] = kwargs.get('mask', ITEM_MASK)

        if 'filter' in kwargs:
            get_kwargs['filter'] = kwargs['filter']

        package = self.get_package_by_key(package_keyname, mask='id')
        items = self.package_svc.getItems(id=package['id'], **get_kwargs)
        return items
1057962
def package_list(self, repo, name, INDEX, installed):
        
        tty_size = os.popen("stty size", "r").read().split()
        row = int(tty_size[0]) - 2
        try:
            all_installed_names = []
            index, page, pkg_list = 0, row, []
            r = self.list_lib(repo)
            pkg_list = self.list_greps(repo, r)[0]
            all_installed_names = self.list_of_installed(repo, name)
            print("")
            for pkg in sorted(pkg_list):
                pkg = self._splitting_packages(pkg, repo, name)
                if installed:
                    if repo == "sbo":
                        if pkg in all_installed_names:
                            pkg = ("{0}{1}{2}".format(self.meta.color["GREEN"],
                                                      pkg,
                                                      self.meta.color["ENDC"]))
                    else:
                        if pkg in all_installed_names:
                            pkg = ("{0}{1}{2}".format(self.meta.color["GREEN"],
                                                      pkg,
                                                      self.meta.color["ENDC"]))
                if INDEX:
                    index += 1
                    pkg = self.list_color_tag(pkg)
                    print("{0}{1}:{2} {3}".format(
                        self.meta.color["GREY"], index,
                        self.meta.color["ENDC"], pkg))
                    if index == page:
                        read = raw_input("\nPress {0}Enter{1} to "
                                         "continue... ".format(
                                             self.meta.color["CYAN"],
                                             self.meta.color["ENDC"]))
                        if read in ["Q", "q"]:
                            break
                        print("")   # new line after page
                        page += row
                else:
                    print(pkg)
            print("")   # new line at end
        except EOFError:
            print("")   # new line at exit
            raise SystemExit()
1315049
def list_presets(self, package_keyname, **kwargs):
        
        get_kwargs = {}
        get_kwargs['mask'] = kwargs.get('mask', PRESET_MASK)

        if 'filter' in kwargs:
            get_kwargs['filter'] = kwargs['filter']

        package = self.get_package_by_key(package_keyname, mask='id')
        acc_presets = self.package_svc.getAccountRestrictedActivePresets(id=package['id'], **get_kwargs)
        active_presets = self.package_svc.getActivePresets(id=package['id'], **get_kwargs)
        return active_presets + acc_presets
509847
public function getExtensionsByPackage($key, $packageName) {
		if ($this->packages->has($packageName)) {
			$pkg = $this->packages->get($packageName);
			if ($pkg->has($key)) {
				return $pkg->get($key);
			}
		}
		
		return [];
	}
1344851
def get_packages(session):
    """"""
    _LOGGER.info("attempting to get package data")
    response = _get_dashboard(session)
    parsed = BeautifulSoup(response.text, HTML_PARSER)
    packages = []
    for row in parsed.find_all('div', {'class': 'pack_row'}):
        packages.append({
            'tracking_number': _get_tracking_number(row),
            'primary_status': _get_primary_status(row),
            'secondary_status': _get_secondary_status(row),
            'status_timestamp': _get_status_timestamp(row),
            'shipped_from': _get_shipped_from(row),
            'delivery_date': _get_delivery_date(row)
        })
    return packages
387381
def get_realnames(packages):
    
    return sorted({get_distribution(p).project_name for p in packages},
                  key=lambda n: n.lower())
274574
def package_locations(self, package_keyname):
        
        mask = "mask[description, keyname, locations]"

        package = self.get_package_by_key(package_keyname, mask='id')

        regions = self.package_svc.getRegions(id=package['id'], mask=mask)
        return regions
787624
def list_packages(self, **kwargs):
        
        get_kwargs = {}
        get_kwargs['mask'] = kwargs.get('mask', PACKAGE_MASK)

        if 'filter' in kwargs:
            get_kwargs['filter'] = kwargs['filter']

        packages = self.package_svc.getAllObjects(**get_kwargs)

        return [package for package in packages if package['isActive']]
633788
def view_package_path(self, package: str) -> _PATH:
        ''''''
        if package not in self.view_packgets_list():
            raise NoSuchPackageException(
                f'There is no such package {package!r}.')
        output, _ = self._execute(
            '-s', self.device_sn, 'shell', 'pm', 'path', package)
        return output[8:-1]
405570
def list_color_tag(self, pkg):
        
        name = GetFromInstalled(pkg).name()
        find = name + self.meta.sp
        if pkg.endswith(".txz") or pkg.endswith(".tgz"):
            find = pkg[:-4]
        if find_package(find, self.meta.pkg_path):
            pkg = "{0}{1}{2}".format(self.meta.color["GREEN"], pkg,
                                     self.meta.color["ENDC"])
        return pkg
1062630
public static List<Class<?>> scanPackage(String... packages) throws IOException, ClassNotFoundException {
        List<Class<?>> list = new ArrayList<>();
        for (String pkg : packages) {
            list.addAll(getClasses(pkg));
        }
        return list;
    }
246671
def getPackages(plist):
	
	nlist = plist.split('\n')
	pkgs = []
	for i in nlist:
		if i.find('===') > 0: continue
		pkg = i.split()[0]
		if pkg   == 'Warning:': continue
		elif pkg == 'Could': continue
		elif pkg == 'Some': continue
		elif pkg == 'You': continue
		elif not pkg: continue
		pkgs.append(pkg)

	print('  >> Found', len(pkgs), 'packages')

	return pkgs
1318751
def tag_list(package):
    
    team, owner, pkg = parse_package(package)
    session = _get_session(team)

    response = session.get(
        "{url}/api/tag/{owner}/{pkg}/".format(
            url=get_registry_url(team),
            owner=owner,
            pkg=pkg
        )
    )

    for tag in response.json()['tags']:
        print("%s: %s" % (tag['tag'], tag['hash']))
1263423
def _get_item(self, package, flavor):
        """"""

        for item in package['items']:
            if item['keyName'] == flavor:
                return item

        raise SoftLayer.SoftLayerError("Could not find valid item for: '%s'" % flavor)
234631
def get_keys(self, lst):
        
        pk_name = self.get_pk_name()
        if self.is_pk_composite():
            return [[getattr(item, pk) for pk in pk_name] for item in lst]
        else:
            return [getattr(item, pk_name) for item in lst]
1229131
def list_packages(self, installed=True, notinstalled=True):
        """"""

        self.profile = Profile()

        # Classify packages
        installed_packages = []
        notinstalled_packages = []

        for package in self.packages:
            data = {
                'name': package,
                'version': None,
                'description': self.packages.get(package).get('description')
            }
            if package in self.profile.packages:
                data['version'] = self.profile.get_package_version(
                    package, self.get_package_release_name(package))
                installed_packages += [data]
            else:
                notinstalled_packages += [data]

        # Print tables
        terminal_width, _ = click.get_terminal_size()

        if installed and installed_packages:

            # - Print installed packages table
            click.echo('\nInstalled packages:\n')

            PACKAGELIST_TPL = ('{name:20} {description:30} {version:<8}')

            click.echo('-' * terminal_width)
            click.echo(PACKAGELIST_TPL.format(
                name=click.style('Name', fg='cyan'), version='Version',
                description='Description'))
            click.echo('-' * terminal_width)

            for package in installed_packages:
                click.echo(PACKAGELIST_TPL.format(
                    name=click.style(package.get('name'), fg='cyan'),
                    version=package.get('version'),
                    description=package.get('description')))

        if notinstalled and notinstalled_packages:

            # - Print not installed packages table
            click.echo('\nNot installed packages:\n')

            PACKAGELIST_TPL = ('{name:20} {description:30}')

            click.echo('-' * terminal_width)
            click.echo(PACKAGELIST_TPL.format(
                name=click.style('Name', fg='yellow'),
                description='Description'))
            click.echo('-' * terminal_width)

            for package in notinstalled_packages:
                click.echo(PACKAGELIST_TPL.format(
                    name=click.style(package.get('name'), fg='yellow'),
                    description=package.get('description')))
1104607
def variables(package):
    
    _raise_if_not_exists(package)
    result = _query(package, '--print-variables')
    names = (x.strip() for x in result.split('\n') if x != '')
    return dict(((x, _query(package, '--variable={0}'.format(x)).strip()) for x in names))