{"action":"created","issue":{"url":"https://api.github.com/repos/enkore/i3pystatus/issues/166","labels_url":"https://api.github.com/repos/enkore/i3pystatus/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/enkore/i3pystatus/issues/166/comments","events_url":"https://api.github.com/repos/enkore/i3pystatus/issues/166/events","html_url":"https://github.com/enkore/i3pystatus/pull/166","id":55404646,"number":166,"title":"Credentials","user":{"login":"facetoe","id":1366896,"avatar_url":"https://avatars.githubusercontent.com/u/1366896?v=3","gravatar_id":"","url":"https://api.github.com/users/facetoe","html_url":"https://github.com/facetoe","followers_url":"https://api.github.com/users/facetoe/followers","following_url":"https://api.github.com/users/facetoe/following{/other_user}","gists_url":"https://api.github.com/users/facetoe/gists{/gist_id}","starred_url":"https://api.github.com/users/facetoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facetoe/subscriptions","organizations_url":"https://api.github.com/users/facetoe/orgs","repos_url":"https://api.github.com/users/facetoe/repos","events_url":"https://api.github.com/users/facetoe/events{/privacy}","received_events_url":"https://api.github.com/users/facetoe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-01-25T08:17:04Z","updated_at":"2015-02-13T12:24:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/enkore/i3pystatus/pulls/166","html_url":"https://github.com/enkore/i3pystatus/pull/166","diff_url":"https://github.com/enkore/i3pystatus/pull/166.diff","patch_url":"https://github.com/enkore/i3pystatus/pull/166.patch"},"body":"Added possible implementation of securing credentials for #165 and a hacky script to set credentials for modules that require them.\r\n\r\nThis implementation supports custom backends that the user can write or we could package with i3pystatus. All modules that would benefit from secure credentials will need a new class variable `keyring_backend` in order to support custom backends. If this value is defined then it will be used to retrieve credentials, otherwise the default backend will be used. Users can define these backends in their config, eg:\r\n\r\n        status.register('github',\r\n                        keyring_backend=NetrcBackend())\r\n\r\nThe key used to identify credentials is in the form `package.module.Class.setting`, eg `i3pystatus.reddit.Reddit.username`, or `i3pystatus.reddit.Reddit.password`. Any custom backends need to conform to this format in order for their credentials to be found. \r\n\r\nA setting is considered protected and will be searched for if it is in the `__PROTECTED_SETTINGS` array located in `SettingsBase` and is not already set. \r\n\r\nLet me know what you guys think. If you're happy with this and don't have any suggestions I'll update the docs and clean things up. "},"comment":{"url":"https://api.github.com/repos/enkore/i3pystatus/issues/comments/74246151","html_url":"https://github.com/enkore/i3pystatus/pull/166#issuecomment-74246151","issue_url":"https://api.github.com/repos/enkore/i3pystatus/issues/166","id":74246151,"user":{"login":"teto","id":886074,"avatar_url":"https://avatars.githubusercontent.com/u/886074?v=3","gravatar_id":"","url":"https://api.github.com/users/teto","html_url":"https://github.com/teto","followers_url":"https://api.github.com/users/teto/followers","following_url":"https://api.github.com/users/teto/following{/other_user}","gists_url":"https://api.github.com/users/teto/gists{/gist_id}","starred_url":"https://api.github.com/users/teto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teto/subscriptions","organizations_url":"https://api.github.com/users/teto/orgs","repos_url":"https://api.github.com/users/teto/repos","events_url":"https://api.github.com/users/teto/events{/privacy}","received_events_url":"https://api.github.com/users/teto/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T12:24:56Z","updated_at":"2015-02-13T12:24:56Z","body":"Truncating the output of errors could be a nice addition while waiting for some fix in i3bar (it may go in a separate PR).\r\nI've got a 'Bad credentials' though my credentials look good. If you don't use it there is no reason for you to work further on this. You could remove it from the PR, and I will try to upstream the NetRcBackend in python-keyring but that won't be before the end of this month or next one.\r\n"}}