title: Additional key: values not being added to Python Dictionary
body: <p><strong>Summary problem:</strong> Building an API endpoint and trying to push new key:values to the existing API. Not knowing if I am correctly adding key value pairs or not. Familiar with Ruby but first time Python user!</p>
  <p><strong>Context</strong>:
  I currently have a method that will format given information into a Python Dictionary to be used as a JSON for my API. I have one method that pushes information to this method but another that is not functioning. Can anybody spot why?</p>
  <p><strong>Things I've tried:</strong>
  Feature test using command line environment
  Getting visibility - Printing</p>
  <p><strong>Environment</strong>:
  MacOS 11.1, python 3.9.1, VSCode</p>
  <p>Code:</p>
  <p><strong>METHOD THAT IS FORMATTING</strong></p>
  <pre><code>class Database(object):
  def __init__(self):
      self.data = {}
  
  def insert_entity(self, kind, entity):
      kind_dict = self.data.get(kind, {})
      entity_id = entity.get('id', str(uuid4()))
      if not isinstance(entity_id, str):
          raise Exception('Entity `id` must be a string')
      entity['id'] = entity_id
      kind_dict[entity_id] = entity
      self.data[kind] = kind_dict
      return entity
  
  def get_entity(self, kind, entity_id):
      entities = self.data.get(kind, {})
      return entities.get(entity_id, None)
  
  def get_all_entities(self, kind):
      return list(self.data.get(kind, {}).values())
  </code></pre>
  <p><strong>METHOD THAT IS WORKING:</strong></p>
  <pre><code>def initialise_user_data():
  first_names = ['Ron', 'Paul', 'Simon', 'David', 'Phil', 'Ada', 'Julia']
  last_names = [
      'Legend', 'Mac', 'Stuartson', 'Sili', 'Word', 'Nine',
      'Smith'
  ]
  for index in range(len(first_names)):
      first_name = first_names[index]
      last_name = last_names[index]
      email = str(random.randint(0, 9999)) + &quot;@email.com&quot;
      user_data = {
          'firstName': first_name,
          'lastName': last_name,
          'email': email
      }
      database.insert_entity('User', user_data)
  </code></pre>
  <p><strong>METHOD THAT IS NOT WORKING:</strong></p>
  <pre><code>def initialise_event_data():
  users = database.get_all_entities('User')
  for user in users:
      for _ in range(random.randint(0, 10)):
          database.insert_entity(
              'Event', {
                  'userId': user['id'],
                  'points': 100,
                  'eventName': 'levels_completed'
              })
  </code></pre>
  <p>ALL METHODS ARE INVOKED AS SUCH:</p>
  <pre><code>database = InMemoryDatabase()
  initialise_data()
  
  def initialise_data():
  initialise_user_data()
  initialise_event_data()
  initialise_follow_data()
  </code></pre>