You are not logged in.

#1 2013-04-11 07:56:56

cdown
Member
From: London, England
Registered: 2013-02-09
Posts: 55
Website

pyaur: AUR API library in Python 3

I've started writing a library to access the AUR API in Python 3, mostly as an exercise for me to learn what has changed since Python 2. Expect features to be added fairly swiftly. Hoping to get feedback early in development so that anyone more familiar with the API/more familiar with Python 3 is able to give useful input.

search, msearch, and info are implemented. Main things missing:

- More unit test coverage
- Documentation (for now, look at tests-real to see what you should do, basically you just need AURClient.[method]).
- multiinfo queries

Please feel free to submit pull requests/etc. Once it's more complete I'll sort out an AUR package.

- GitHub: https://github.com/cdown/pyaur
- Travis: https://travis-ci.org/cdown/pyaur

Last edited by cdown (2013-04-11 15:39:48)

Offline

#2 2013-04-11 15:31:36

cdown
Member
From: London, England
Registered: 2013-02-09
Posts: 55
Website

Re: pyaur: AUR API library in Python 3

I'm done for today, will continue tomorrow. search, msearch, and info are now implemented. Documentation and multiinfo need doing next.

Last edited by cdown (2013-04-11 15:40:10)

Offline

#3 2013-04-11 16:02:41

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: pyaur: AUR API library in Python 3

cdown wrote:

I've started writing a library to access the AUR API in Python 3, mostly as an exercise for me to learn what has changed since Python 2.

I recently learned Python. I learned about the great Python 2 and Python 3 division of opinions. After some time, I decided to read a list of the differences between Python 2 and 3. I was surprised. I discovered that, I just don't think they're all that different. hmm But, I suppose it depends a lot on what type of application is being written.

What is your opinion?

Offline

#4 2013-04-11 18:05:55

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: pyaur: AUR API library in Python 3

Out of curiosity, are you aware that there already is a Python-3 library for AUR automation and interaction?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2013-04-12 02:52:59

cdown
Member
From: London, England
Registered: 2013-02-09
Posts: 55
Website

Re: pyaur: AUR API library in Python 3

drcouzelis wrote:
cdown wrote:

I've started writing a library to access the AUR API in Python 3, mostly as an exercise for me to learn what has changed since Python 2.

I recently learned Python. I learned about the great Python 2 and Python 3 division of opinions. After some time, I decided to read a list of the differences between Python 2 and 3. I was surprised. I discovered that, I just don't think they're all that different. hmm But, I suppose it depends a lot on what type of application is being written.

What is your opinion?

If you've not been programming Python for a long time probably they look very similar, and they are. There have been a few times I've tripped up because of the changes to strings (mostly expectations about what type of object a particular method will return).

Xyne wrote:

Out of curiosity, are you aware that there already is a Python-3 library for AUR automation and interaction?

I wasn't aware, but I didn't look very hard when I first started this project. At least now people will have multiple options to choose from.

I think my project also has a smaller scope than yours, I'm only intending to implement the RPC API. Another thing I want to implement down the road is out of the box compatibility with Python 2.6+, not sure if that already works with yours.

Last edited by cdown (2013-04-12 02:55:53)

Offline

#6 2013-04-12 03:58:46

cdown
Member
From: London, England
Registered: 2013-02-09
Posts: 55
Website

Re: pyaur: AUR API library in Python 3

Now fully compatible with Python 2 and 3.

Offline

Board footer

Powered by FluxBB