Skip to content

Instantly share code, notes, and snippets.

Last active June 30, 2019 04:01
What would you like to do?
Snippet for "Why Refactoring? How to Refactor/Restructure Python Package?"
This is where backward compatibility code lives.
This is to ensure the refactored package supports
old way of import.
from .constants import CONFIG_NAME, LOGGING_LEVEL
from .helpers import ConfigHelper as _ConfigHelper
def get_logging_level(*args, **kwargs):
return _ConfigHelper().get_logging_level()
class ConfigHelper(_ConfigHelper):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment