Skip to content

Instantly share code, notes, and snippets.

@patsbin
Last active September 11, 2018 08:43
Show Gist options
  • Save patsbin/f3bb136f620fd5e3d8fc78f65a9d1dda to your computer and use it in GitHub Desktop.
Save patsbin/f3bb136f620fd5e3d8fc78f65a9d1dda to your computer and use it in GitHub Desktop.
Separation of really simple configuration in python
#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