from woocommerce import API as WOO_API
from django.conf import settings


def get_woo_connection():
    return WOO_API(
        url=settings.WOO_URL,
        consumer_key=settings.WOO_CONSUMER_KEY,
        consumer_secret=settings.WOO_CONSUMER_SECRET,
        wp_api=settings.WOO_WP_API,
        version=settings.WOO_VERSION,
        query_string_auth=settings.WOO_QUERY_STRING_AUTH,
        timeout=settings.WOO_API_TIMEOUT
    )
