6 ms·
"hello" generates... hello_world: from funcs import funcs_builder from funcs_spec import funcs_spec from funcs_unit import Unit import ui import os import sys
by jonathankoren 7y ago
"hello" generates...
hello_world:
from funcs import funcs_builder from funcs_spec import funcs_spec from funcs_unit import Unit import ui import os import sys import sys.stdin import time import json from scopes import Context , QueryBuilder , StructContext , ContextHandler , QueryBuilderType , ContextType , StringContext def add_from ( builder , context_id ): """ Create a query builder that expects a builder object. """ # Create the context that contains the custom query builder if Context ( builders_context ) is None : context_type = StructContext ( builder ) . type . get () # Define the builder for this context in context_builder ( context_id ): context = builder . get_context ( context_id ) # Create the query builder for the query builder in context . query_builder ( context , context_id ): return builder return "hello_world" class CustomSchema ( QueryBuilder ): querysource = { 'base' : 'world' , 'world_scopes' : [], 'query_builder' : 'hello_world' , } query_builder = CustomSchema () def add_to