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: .. code-block:: bash 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 ~~~~~~~~~~~~~~~~ .. code-block:: python >>> import yarg >>> package = yarg.get("yarg") >>> package.name u'yarg' >>> package.author Author(name=u'Kura', email=u'kura@kura.io') :meth:`yarg.get` returns an instance of :class:`yarg.package.Package`. Newest packages interface ~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: python >>> import yarg >>> packages = yarg.newest_packages() >>> packages [, , ] >>> packages[0].name u'yarg' >>> packages.url u'http://pypi.python.org/pypi/yarg :meth:`yarg.newest_packages` returns a list of :class:`yarg.parse.Package` objects. Updated packages interface ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: python >>> import yarg >>> packages = yarg.latest_updated_packages() >>> packages [, , ] >>> 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 :meth:`yarg.latest_updated_packages` returns a list of :class:`yarg.parse.Package` objects.