Skip to content

Conversation

@Script-Nomad
Copy link
Contributor

... to allow api_key declaration without relying on environment variables

I am coding a plugin for another program which will utilize smtp2go as a dependency, and being able to set the api_key within a configuration file was preferable to declaring an environment variable because all users require access to it, but neither does the program run as root, which is not ideal.

In general, forcing the user to set environment variables is not friendly to developers, hence the change. The changes are made such that the user can declare the api_key when the class is instantiated without requiring the environment variable, but still performs a check for the presence of the environment variable if api_key is unset at the time of instantiation. This is to avoid breaking compatibility or existing installations.

@coveralls
Copy link

coveralls commented Apr 11, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 0da338d on True-Demon:class_change into 9a86de3 on smtp2go-oss:master.

@corymb
Copy link
Contributor

corymb commented Apr 12, 2018

Hey!

First of all, thank you so much for contributing - it's awesome to know that people are using it and if you've got any other feature requests or anything like that, let us know.

Looks good - judging from the docstring I originally intended to do it that way so not sure why it got moved to just the environment variable.

Could you switch the tabs to spaces so it passes the tests? If you fix that, I'll merge it in, update the deps and release it.

Thanks for contributing!

@Script-Nomad
Copy link
Contributor Author

Sure thing. That's what I get for editing outside pycharm, lol. You should be set to go now. Thanks for accepting the PR.

@corymb corymb merged commit 9a4c6cb into smtp2go-oss:master Apr 12, 2018
@corymb
Copy link
Contributor

corymb commented Apr 12, 2018

You're most welcome. Thank you so much for contributing! I'll keep a closer eye on dependencies now I know it's being used too. Cheers!

@Script-Nomad Script-Nomad deleted the class_change branch April 13, 2018 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants