ntt / eveapi

Python library for accessing the EVE Online API
Other
148 stars 57 forks source link

Finer error handling #14

Closed rjarry closed 12 years ago

rjarry commented 12 years ago

Hello mate,

I hope summer was good :-)

I'm putting my head back in the code and I though that finer error handling would be cool for your lib.

Also I added a basic setup.py file so you can publish the module in pypi and allow people to get it with easy_install (and also put it as a dependency in their projects). If you're not convinced this is a good idea, I'd like to discuss this with you :)

Fly safe o/

Robin AKA diabeteman

ntt commented 12 years ago

Not a bad idea :). I'm not going to keep the same names for those errors though.

I'll prolly go with these: RequestError (having "bad" in there would be redundant) AuthenticationError (since the reason isn't always a bad apikey) ServerError (just seems a bit more "pro")

rjarry commented 12 years ago

Yup your names do sound better. ^^

How about the setup.py script and this whole pypi stuff ?

ntt commented 12 years ago

suppose it can't hurt. I'll have a looksie later.

rjarry commented 12 years ago

Ok tell me if you need some help on this. Pypi is kind of weird, it took me a while to get a grip on it.

If you want to be able to register & upload packages from the command line without all the fuzz on their website (which I recommend). You will need to add a ~/.pypirc file with this content

[pypi]
username=<username>
password=<password>

Then when you have a new version of your package, do this :

./setup.py clean sdist register upload

And you're done :)

ntt commented 12 years ago

some person ninja'd the evapi name on pypi though so ill have to poke him/her first to remove it >.<

rjarry commented 12 years ago

Yes I saw that yesterday :x I hope the guy is not dead nor willing to keep it.

You can always change the package name to ntt-eveapi (it doesn't have to be the same as the python module name)

ntt commented 12 years ago

I'm picky when it comes to names ;-)

rjarry commented 12 years ago

heheh i've noticed that :D

ntt commented 12 years ago

ok, it's up. The other person removed it right away when I asked :)

rjarry commented 12 years ago

Weeeeeee \o/

We're the first ones officially depending on you :)

http://eve-corp-management.org/projects/ecm/repository/revisions/a9def27d76b4

kriberg commented 12 years ago

Nicely done!