{"action":"created","issue":{"url":"https://api.github.com/repos/ultrabug/py3status/issues/1149","repository_url":"https://api.github.com/repos/ultrabug/py3status","labels_url":"https://api.github.com/repos/ultrabug/py3status/issues/1149/labels{/name}","comments_url":"https://api.github.com/repos/ultrabug/py3status/issues/1149/comments","events_url":"https://api.github.com/repos/ultrabug/py3status/issues/1149/events","html_url":"https://github.com/ultrabug/py3status/pull/1149","id":271210527,"number":1149,"title":"Environment variables in config","user":{"login":"alexoneill","id":810848,"avatar_url":"https://avatars0.githubusercontent.com/u/810848?v=4","gravatar_id":"","url":"https://api.github.com/users/alexoneill","html_url":"https://github.com/alexoneill","followers_url":"https://api.github.com/users/alexoneill/followers","following_url":"https://api.github.com/users/alexoneill/following{/other_user}","gists_url":"https://api.github.com/users/alexoneill/gists{/gist_id}","starred_url":"https://api.github.com/users/alexoneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexoneill/subscriptions","organizations_url":"https://api.github.com/users/alexoneill/orgs","repos_url":"https://api.github.com/users/alexoneill/repos","events_url":"https://api.github.com/users/alexoneill/events{/privacy}","received_events_url":"https://api.github.com/users/alexoneill/received_events","type":"User","site_admin":false},"labels":[{"id":28977188,"url":"https://api.github.com/repos/ultrabug/py3status/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ultrabug/py3status/milestones/7","html_url":"https://github.com/ultrabug/py3status/milestone/7","labels_url":"https://api.github.com/repos/ultrabug/py3status/milestones/7/labels","id":2863944,"number":7,"title":"3.8","description":"","creator":{"login":"tobes","id":56311,"avatar_url":"https://avatars2.githubusercontent.com/u/56311?v=4","gravatar_id":"","url":"https://api.github.com/users/tobes","html_url":"https://github.com/tobes","followers_url":"https://api.github.com/users/tobes/followers","following_url":"https://api.github.com/users/tobes/following{/other_user}","gists_url":"https://api.github.com/users/tobes/gists{/gist_id}","starred_url":"https://api.github.com/users/tobes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobes/subscriptions","organizations_url":"https://api.github.com/users/tobes/orgs","repos_url":"https://api.github.com/users/tobes/repos","events_url":"https://api.github.com/users/tobes/events{/privacy}","received_events_url":"https://api.github.com/users/tobes/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":1,"state":"open","created_at":"2017-10-25T05:46:45Z","updated_at":"2017-11-24T12:19:52Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2017-11-04T17:47:17Z","updated_at":"2017-11-28T20:59:55Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ultrabug/py3status/pulls/1149","html_url":"https://github.com/ultrabug/py3status/pull/1149","diff_url":"https://github.com/ultrabug/py3status/pull/1149.diff","patch_url":"https://github.com/ultrabug/py3status/pull/1149.patch"},"body":"This adds support for environment variables in config files.\r\n\r\nThis feature is primarily intended for obfuscating sensitive information within configuration files, such as usernames, passwords, API keys, etc. That way, you can share your config without spoiling secrets!\r\n\r\nYou can take a look at the documentation I added below, but essentially the changes enable the following functionality:\r\n\r\n```python\r\norder += \"my_module\"\r\norder += env(ORDER_MODULE)\r\n\r\nmodule {\r\n    normal_parameter = 'some value'\r\n    env_parameter = env(SOME_ENVIRONMENT_PARAM)\r\n    sensitive_api_key = env(API_KEY)\r\n\r\n    complex_parameter = {\r\n      'key': env(VAL)\r\n    }\r\n\r\n    list_of_tuples = [\r\n      (env(APPLE_NUM, int), 'apple'),\r\n      (2, env(ORANGE))\r\n    ]\r\n\r\n    float_param = env(MY_NUM, float)\r\n}\r\n```\r\n\r\nIn total, this adds:\r\n\r\n- Environment variable support in configuration files via `env(...)`\r\n- Validation of environment variables to ensure presence in the system\r\n- Support for converting values in the variables to specific data types\r\n\r\nAs always, let me know if there is anything I should update or change! :)"},"comment":{"url":"https://api.github.com/repos/ultrabug/py3status/issues/comments/347661749","html_url":"https://github.com/ultrabug/py3status/pull/1149#issuecomment-347661749","issue_url":"https://api.github.com/repos/ultrabug/py3status/issues/1149","id":347661749,"user":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars3.githubusercontent.com/u/474389?v=4","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"created_at":"2017-11-28T20:59:54Z","updated_at":"2017-11-28T20:59:54Z","author_association":"OWNER","body":"Then let's settle for env() thanks a lot.\r\n\r\n@girst this is perfect as community voting is what we're looking for!\r\n\r\n@tobes let's do a one time code review together tomorrow ;)"}}
{"actor":{"display_login":"ultrabug"}}