# Path: statik/utils.py
# def camel_to_snake(camel):
#     return '_'.join(re.findall(r'[A-Z][a-z]*', camel))


import os.path
import psycopg2
import yaml
from statik.errors import *
from statik.utils import camel_to_snake
# -*- codig: utf-8 -*-





__all__ = [
    'ExternalDatabase',
    'PostgreSQL',
]


class ExternalDatabase(object):

    _external_databases = {}

    def __init__(self, params=None, error_context=None):
        self.error_context = error_context or StatikErrorContext()

        if not isinstance(params, dict):
            raise ProjectConfigurationError(

# Path: statik/utils.py
# def camel_to_snake(camel):
#     return '_'.join(re.findall(r'[A-Z][a-z]*', camel))


# Path: statik/external_database.py
import os.path
import psycopg2
import yaml
from statik.errors import *
from statik.utils import camel_to_snake

# -*- codig: utf-8 -*-





__all__ = [
    'ExternalDatabase',
    'PostgreSQL',
]


class ExternalDatabase(object):

    _external_databases = {}

    def __init__(self, params=None, error_context=None):
        self.error_context = error_context or StatikErrorContext()

        if not isinstance(params, dict):
            raise ProjectConfigurationError(

                message="External database configuration parameters must be a dictionary.",