# Path: shpkpr/exceptions.py
# class ShpkprException(ClickException):
# def _args_from_exception(exception):
# def rewrap(exceptions_to_catch, exception_to_rewrap_with=ShpkprException):
#     def real_decorator(function):
#         def wrapper(*args, **kwargs):
# 
# Path: shpkpr/template_filters.py
# def filter_items(value, startswith=None, strip_prefix=False):
# def require_int(value, min=None, max=None):
# def require_float(value, min=None, max=None):
# def slugify(value, *args, **kwargs):
# class IntegerRequired(exceptions.ShpkprException):
# class IntegerTooSmall(exceptions.ShpkprException):
# class IntegerTooLarge(exceptions.ShpkprException):
# class FloatRequired(exceptions.ShpkprException):
# class FloatTooSmall(exceptions.ShpkprException):
# class FloatTooLarge(exceptions.ShpkprException):


import json
import os
import jinja2
from shpkpr import exceptions
from shpkpr import template_filters

    If ``prefix`` is a non-empty string, only environment variables with the
    given prefix will be returned. The prefix, if given, will be stripped from
    any returned keys.

    If ``overrides`` is a dict-like object, the key/value pairs it contains
    will be added to the returned dictionary. Any values specified by
    overrides will take precedence over values pulled from the environment
    where the key names clash.
    """
    values = {}

    # add a trailing underscore to the prefix if there isn't one
    prefix = prefix + "_" if prefix and not prefix.endswith("_") else prefix

    # load values from the environment
    for k, v in os.environ.items():
        if k.startswith(prefix):
            values[k.replace(prefix, "", 1)] = v

    # add override values if any passed in
    try:
        for k, v in overrides.items():
            values[k] = v
    except AttributeError:
        pass

    return values



# Path: shpkpr/exceptions.py
# class ShpkprException(ClickException):
# def _args_from_exception(exception):
# def rewrap(exceptions_to_catch, exception_to_rewrap_with=ShpkprException):
#     def real_decorator(function):
#         def wrapper(*args, **kwargs):
# 
# Path: shpkpr/template_filters.py
# def filter_items(value, startswith=None, strip_prefix=False):
# def require_int(value, min=None, max=None):
# def require_float(value, min=None, max=None):
# def slugify(value, *args, **kwargs):
# class IntegerRequired(exceptions.ShpkprException):
# class IntegerTooSmall(exceptions.ShpkprException):
# class IntegerTooLarge(exceptions.ShpkprException):
# class FloatRequired(exceptions.ShpkprException):
# class FloatTooSmall(exceptions.ShpkprException):
# class FloatTooLarge(exceptions.ShpkprException):


# Path: shpkpr/template.py
import json
import os
import jinja2
from shpkpr import exceptions
from shpkpr import template_filters


    If ``prefix`` is a non-empty string, only environment variables with the
    given prefix will be returned. The prefix, if given, will be stripped from
    any returned keys.

    If ``overrides`` is a dict-like object, the key/value pairs it contains
    will be added to the returned dictionary. Any values specified by
    overrides will take precedence over values pulled from the environment
    where the key names clash.
    """
    values = {}

    # add a trailing underscore to the prefix if there isn't one
    prefix = prefix + "_" if prefix and not prefix.endswith("_") else prefix

    # load values from the environment
    for k, v in os.environ.items():
        if k.startswith(prefix):
            values[k.replace(prefix, "", 1)] = v

    # add override values if any passed in
    try:
        for k, v in overrides.items():
            values[k] = v
    except AttributeError:
        pass

    return values



@exceptions.rewrap(ValueError, InvalidJSONError)