Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

        def valid_kwarg(aspects, arg_name=""):
    def _valid_aspect(func):
        def inner(*args, **kwargs):
            name = arg_name if arg_name else "aspect"
            if name in kwargs.keys() and kwargs[name] not in aspects:
                raise ValueError("Invalid %s: %s" % (name, kwargs[name]))
            return func(*args, **kwargs)
        return inner
    return _valid_aspect

src/p/y/python-parsely-1.4.2/parsely/parsely.py   python-parsely(Download)
from models import Post, Author, Section, Topic, Tag, Referrer, Shares
from utils import _format_analytics_args, _format_date_args, _require_both
from utils import ParselyAPIConnection, valid_kwarg