Skip to content

Instantly share code, notes, and snippets.

@eightysteele
Created August 6, 2011 02:25
Show Gist options
  • Select an option

  • Save eightysteele/1128924 to your computer and use it in GitHub Desktop.

Select an option

Save eightysteele/1128924 to your computer and use it in GitHub Desktop.
def add_dynamic_properties(input_dict, instance, bulkload_state_copy):
for key,value in input_dict.iteritems():
if key in PROPERTIES_STOP_CONCEPTS:
continue
try:
instance[key] = value.lower()
except:
pass
instance.pop('rechash')
instance.pop('reckey')
recstate = instance.pop('recstate')
if recstate == 'deleted':
return datastore.Entity('RecordIndex')
return instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment