Skip to content

Instantly share code, notes, and snippets.

@jamesbursa
Created March 8, 2023 17:36
Show Gist options
  • Save jamesbursa/bbc13ffe7982236bfaa9d177c448b33d to your computer and use it in GitHub Desktop.
Save jamesbursa/bbc13ffe7982236bfaa9d177c448b33d to your computer and use it in GitHub Desktop.
Configuration override as python
#
# Configuration for local development.
#
# If you need to make local changes, add them to override.py instead to avoid
# conflicts.
#
logging_level = {
"sqlalchemy": "INFO",
}
from .override import *
#
# Overrides for local development.
#
logging_level = {
"sqlalchemy": "DEBUG",
}
@jamesbursa
Copy link
Author

Example:

$ python3
...

>>> from config import local as config

>>> config
<module 'config.local' from '/tmp/test/config/local.py'>

>>> config.logging_level
{'sqlalchemy': 'DEBUG'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment