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)[source]

A PyPI package generated from the RSS feed information.

Parameters:pypi_dict – A dictionary retrieved from the PyPI server.
name[source]
>>> package = yarg.newest_packages()[0]
>>> package.name
u'yarg'
>>> package = yarg.latest_updated_packages()[0]
>>> package.name
u'yarg'
version[source]
>>> package = yarg.newest_packages()[0]
>>> package.name
u'yarg'
>>> package = yarg.latest_updated_packages()[0]
>>> package.name
u'yarg'
url[source]

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

>>> package = yarg.latest_updated_packages()[0]
>>> package.url
u'http://pypi.python.org/pypi/yarg'
date[source]
>>> 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)
description[source]
>>> package = yarg.newest_packages()[0]
>>> package.description
u'Some random summary stuff'
>>> package = yarg.latest_updated_packages()[0]
>>> package.description
u'Some random summary stuff'
Fork me on GitHub

Table Of Contents

Related Topics

This Page