@@ -0,0 +1,1928 @@
+%22%22%22%0AWood author: thislight%0A%0ACopyright 2016 thislight%0A%0A   Licensed under the Apache License, Version 2.0 (the %22License%22);%0A   you may not use this file except in compliance with the License.%0A   You may obtain a copy of the License at%0A%0A       http://www.apache.org/licenses/LICENSE-2.0%0A%0A   Unless required by applicable law or agreed to in writing, software%0A   distributed under the License is distributed on an %22AS IS%22 BASIS,%0A   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A   See the License for the specific language governing permissions and%0A   limitations under the License.%0A%0AUnder License Apache v2, more information, see file 'LICENSE' in project root directory.%0A%22%22%22%0Afrom ..wood import make_empty_view%0A%0Aclass Blueprint(object):%0A    def __init__(self):%0A        self.handlers = %5B%5D%0A%0A    def empty(self, uri, name, *parents):%0A        %22%22%22%0A        Get a empty %60PackedHandler%60%0A        :param uri: str%0A        :param name: str, name of handler%0A        :param parents: parents of handler%0A        :return: PackedHandler%0A        %22%22%22%0A        v = make_empty_view(uri=uri, name=name, *parents)%0A        self.handlers.append(v)%0A        return v%0A%0A    def route(self, uri=r%22/%22, method=%22get%22, *parents, **kargs):%0A        %22%22%22%0A        Get a handler and add route%0A        :param uri: str%0A        :param method: str, method of function%0A        :param parents: parents of handler%0A        :param kargs:no use%0A        :return: function%0A        %22%22%22%0A        def register_route(func):%0A            %22%22%22%0A            :param func: function%0A            :return: PackedHandler%0A            %22%22%22%0A            v = self.empty(uri,func.__name___,*parents)%0A            v.override(method.lower())(func)%0A            return v%0A%0A        return register_route%0A%0A    def to(self,w):%0A        for handler in self.handlers:%0A            w.register(handler)%0A%0A    def get_wood(self,**kargs):%0A        w = Wood(**kargs)%0A        self.to(w)%0A        return w%0A

ADD buleprint support