aur is a Python library that makes it easy to access and parse data from the Arch User Repository API.
Full documentation is available on ReadTheDocs.
If you know how to use the Arch User Repository API, you know how to use
this module. The only difference is that PascalCase package attributes are
converted to confirm to Python conventions (for example, OutOfDate
becomes out_of_date
, and FirstSubmitted
becomes
first_submitted
).
>>> yturl = aur.info('yturl')
>>> yturl.description
'YouTube videos on the command line'
>>> poco = aur.search('poco')
>>> poco
[<Package: flopoco>, <Package: poco-git>, <Package: poco>, <Package: libpoco-basic>]
>>> poco[0].first_submitted
datetime.datetime(2013, 8, 21, 21, 3, 9)
>>> aur.multiinfo(['tzupdate', 'xinput-toggle'])
{'tzupdate': <Package: tzupdate>, 'xinput-toggle': <Package: xinput-toggle>}
To install the latest stable version from PyPi:
$ pip install -U aur
To install the latest development version directly from GitHub:
$ pip install -U git+https://github.com/cdown/aur.git@develop
$ pip install tox $ tox .......... ---------------------------------------------------------------------- Ran 10 tests in 4.088s OK