Introduction

Prerequisites

Yarg works with Python 2.6.x, 2.7.x, => 3.3, pypy and pypy3.

Installation

There are multiple ways to install Yarg.

As source or as a wheel from PyPI using easy_install or pip:

easy_install yarg
pip install yarg

From the tarball release

  1. Download the most recent tarball from the PyPI download page
  2. Unpack the tarball
  3. python setup.py install

Getting started

Search interface

>>> import yarg
>>> package = yarg.get("yarg")
>>> package.name
u'yarg'
>>> package.author
Author(name=u'Kura', email=u'kura@kura.io')

yarg.get() returns an instance of yarg.package.Package.

Newest packages interface

>>> import yarg
>>> packages = yarg.newest_packages()
>>> packages
[<Package yarg>, <Package gray>, <Package ragy>]
>>> packages[0].name
u'yarg'
>>> packages.url
u'http://pypi.python.org/pypi/yarg

yarg.newest_packages() returns a list of yarg.parse.Package objects.

Updated packages interface

>>> import yarg
>>> packages = yarg.latest_updated_packages()
>>> packages
[<Package yarg>, <Package gray>, <Package ragy>]
>>> packages[0].name
u'yarg'
>>> packages[0].version
u'0.1.2'
>>> packages[0].url
u'http://pypi.python.org/pypi/yarg/0.1.2

yarg.latest_updated_packages() returns a list of yarg.parse.Package objects.