# API - Package RSS Feeds

## Query Interface

yarg.newest_packages(pypi_server='https://pypi.python.org/pypi?%3Aaction=packages_rss')

  Constructs a request to the PyPI server and returns a list of `yarg.parse.Package`.

  Parameters:

    pypi_server –

    (option) URL to the PyPI server.

        >>> import yarg
        >>> yarg.newest_packages()
        [<Package yarg>, <Package gray>, <Package ragy>]

yarg.latest_updated_packages(pypi_server='https://pypi.python.org/pypi?%3Aaction=rss')

  Constructs a request to the PyPI server and returns a list of `yarg.parse.Package`.

  Parameters:

    pypi_server –

    (option) URL to the PyPI server.

        >>> import yarg
        >>> yarg.latest_updated_packages()
        [<Package yarg>, <Package gray>, <Package ragy>]

## Package Object

class yarg.parse.Package(pypi_dict)

  A PyPI package generated from the RSS feed information.

  Parameters:

    pypi_dict – A dictionary retrieved from the PyPI server.

  property name

        >>> package = yarg.newest_packages()[0]
        >>> package.name
        'yarg'
        >>> package = yarg.latest_updated_packages()[0]
        >>> package.name
        'yarg'

  property version

        >>> package = yarg.newest_packages()[0]
        >>> package.name
        'yarg'
        >>> package = yarg.latest_updated_packages()[0]
        >>> package.name
        'yarg'

  property url

    This is only available for `yarg.latest_updated_packages()`, for `yarg.newest_packages()` will return None

        >>> package = yarg.latest_updated_packages()[0]
        >>> package.url
        'http://pypi.python.org/pypi/yarg'

  property date

        >>> package = yarg.newest_packages()[0]
        >>> package.date
        datetime.datetime(2014, 8, 9, 8, 40, 20)
        >>> package = yarg.latest_updated_packages()[0]
        >>> package.date
        datetime.datetime(2014, 8, 9, 8, 40, 20)

  property description

        >>> package = yarg.newest_packages()[0]
        >>> package.description
        'Some random summary stuff'
        >>> package = yarg.latest_updated_packages()[0]
        >>> package.description
        'Some random summary stuff'