z4r / python-rtkit

Python Api for Request Tracker's REST interface
http://z4r.github.com/python-rtkit/
Other
68 stars 44 forks source link

Add helper method to connect using ~/.rtrc #24

Closed dehnert closed 11 years ago

dehnert commented 11 years ago

A common connection scheme is probably to read the server, username, and/or password out of the ~/.rtrc file. Facilitate this process so that API clients don't need to implement the file-reading themselves.

coveralls commented 11 years ago

Coverage decreased (-1.46%) when pulling b941289645b506d07c3e61272c3e2c77d196d71d on dehnert:rtrc into 9a9fd7ac31ef7968d530dddcbe76fbf3a7a5f78c on z4r:master.

View Details

z4r commented 11 years ago

I like your idea, but I would prefer some kind of standard (json, yaml, ini). In addition we should add the same helper to the tracker.

Do you agree?

dehnert commented 11 years ago

I like your idea, but I would prefer some kind of standard (json, yaml, ini).

The ~/.rtrc file is "standard" insofaras it's automatically used by the "rt" command line client distributed with RequestTracker. It seems a pity not to support the config file that upstream is using, regardless of whether we also support JSON/YAML/ini/???.

In addition we should add the same helper to the tracker.

Tracker inherits from RTResource, so Tracker.from_rtrc(auth) will work as-is.

z4r commented 11 years ago

Ok, i've to stop to reply just awake :) I didn't know about the rt command. During the day I'll merge and i'll add some test.

Thx