title: How to do a custom insert inside a python-eve app
body: <p>I have some custom flask methods in an eve app that need to communicate with a telnet device and return a result, but I also want to pre-populate data into some resources after retrieving data from this telnet device, like so:</p>
  
  <pre><code>@app.route("/get_vlan_description", methods=['POST'])
  def get_vlan_description():
      switch = prepare_switch(request)
      result = dispatch_switch_command(switch, 'get_vlan_description')
  
      # TODO: populate vlans resource with result data and return status
  </code></pre>
  
  <p>My settings.py looks like this:</p>
  
  <pre><code>SERVER_NAME = '127.0.0.1:5000'
  DOMAIN = {
      'vlans': {
          'id': {
              'type': 'integer',
              'required': True,
              'unique': True
          },
          'subnet': {
              'type': 'string',
              'required': True
          },
          'description': {
              'type': 'boolean',
              'default': False
          }
      }
  }
  </code></pre>
  
  <p>I'm having trouble finding docs or source code for how to access a mongo resource directly and insert this data.</p>