App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Functions | Variables
google.appengine.ext.ndb.utils Namespace Reference

Functions

def logging_debug
 
def wrapping
 
def get_stack
 
def func_info
 
def gen_info
 
def frame_info
 
def code_info
 
def positional
 
def decorator
 
def tweak_logging
 

Variables

list __all__ = []
 
 DEBUG = True
 
 threading_local = threading.local
 

Detailed Description

Low-level utilities used internally by NDB.

These are not meant for use by code outside NDB.

Function Documentation

def google.appengine.ext.ndb.utils.decorator (   wrapped_decorator)
Converts a function into a decorator that optionally accepts keyword
arguments in its declaration.

Example usage:
  @utils.decorator
  def decorator(func, args, kwds, op1=None):
    ... apply op1 ...
    return func(*args, **kwds)

  # Form (1), vanilla
  @decorator
  foo(...)
    ...

  # Form (2), with options
  @decorator(op1=5)
  foo(...)
    ...

Args:
  wrapped_decorator: A function that accepts positional args (func, args,
    kwds) and any additional supported keyword arguments.

Returns:
  A decorator with an additional 'wrapped_decorator' property that is set to
the original function.
def google.appengine.ext.ndb.utils.positional (   max_pos_args)
A decorator to declare that only the first N arguments may be positional.

Note that for methods, n includes 'self'.