<s> from datetime import date <EOL> import my_models <EOL> def create_entity ( ) : <EOL> entity = my_models . MyModel ( name = '<STR_LIT>' , xyz = [ <NUM_LIT:10> ** <NUM_LIT:100> , <NUM_LIT:6> ** <NUM_LIT> ] ) <EOL> assert entity . abc == <NUM_LIT:0> <EOL> key = entity . put ( ) <EOL> return key <EOL> def read_and_update_entity ( key ) : <EOL> entity = key . get ( ) <EOL> entity . abc += <NUM_LIT:1> <EOL> entity . xyz . append ( entity . abc // <NUM_LIT:3> ) <EOL> entity . put ( ) <EOL> def query_entity ( ) : <EOL> results = my_models . MyModel . query ( <EOL> my_models . MyModel . xyz == <NUM_LIT:6> ** <NUM_LIT> ) . fetch ( <NUM_LIT:10> ) <EOL> return results <EOL> def create_and_query_columbus ( ) : <EOL> columbus = my_models . HistoricPerson ( <EOL> name = '<STR_LIT>' , <EOL> birth = my_models . FuzzyDate ( date ( <NUM_LIT> , <NUM_LIT:8> , <NUM_LIT> ) , date ( <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT> ) ) , <EOL> death = my_models . FuzzyDate ( date ( <NUM_LIT> , <NUM_LIT:5> , <NUM_LIT:20> ) ) , <EOL> event_dates = [ my_models . FuzzyDate ( <EOL> date ( <NUM_LIT> , <NUM_LIT:1> , <NUM_LIT:1> ) , date ( <NUM_LIT> , <NUM_LIT:12> , <NUM_LIT> ) ) ] , <EOL> event_names = [ '<STR_LIT>' ] ) <EOL> columbus . put ( ) <EOL> results = my_models . HistoricPerson . query ( <EOL> my_models . HistoricPerson . birth . last <= date ( <NUM_LIT> , <NUM_LIT:12> , <NUM_LIT> ) ) . fetch ( ) <EOL> return results </s>
