Last active
September 11, 2018 08:43
-
-
Save patsbin/f3bb136f620fd5e3d8fc78f65a9d1dda to your computer and use it in GitHub Desktop.
Separation of really simple configuration in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #config.py | |
| CONFIG = { | |
| 'key1': 'value1', | |
| 'key2': 'value2' | |
| } | |
| #script.py | |
| import config | |
| print config.CONFIG['key1'] | |
| # Add config.py to your.gitignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment