title: How to write trigger and functions code in python(pymongo) for MongoDB Stitch instead of NodeJS(mongoose)
body: <p>I want to setup a connection of MongoDB Stitch with my Python Script and fire trigger on database events to execute a python function.</p>
  
  <p>I've seen this <a href="https://www.mongodb.com/blog/post/working-with-mongodb-stitch-through-existing-drivers--python" rel="nofollow noreferrer">article</a> which shows connection with stitch of python script. I cannot find how to do this type of <a href="https://docs.mongodb.com/stitch/functions/define-a-function/#import-the-function" rel="nofollow noreferrer">import of JavaScript</a> in python.</p>
  
  <p>I expect if there is deletion of a known collection's TTL index document in my database, then MongoDB will fire up trigger to my Python Script and execute a function in my Python Script. How can I achieve this?</p>