title: Bulk Upload with Google App Engine Datastore via CSV
body: <p>I am building a GAE webapp using Python. I am also using the Datastore and trying to bulk upload data to the DB using the terminal and a CSV file as per:</p>
  
  <p><a href="https://developers.google.com/appengine/docs/python/tools/uploadingdata" rel="nofollow">https://developers.google.com/appengine/docs/python/tools/uploadingdata</a></p>
  
  <p>I have created a Loader class in a separate.py file in my app root directory. I am not really sure if this loader class should be in my main.py webapp file, or another file in the root directory. </p>
  
  <p>Loader class:</p>
  
  <pre><code>import datetime
  from google.appengine.ext import db
  from google.appengine.tools import bulkloader
  import models
  
  
  class FTSELoader(bulkloader.Loader):
      def __init__(self):
          bulkloader.Loader.__init__(self, 'FTSE',
                                 [('date', lambda x: datetime.datetime.strptime(x, '%Y/%m/%d')),                                 
                                 ('close', float)])
  loaders = [FTSELoader]
  </code></pre>
  
  <p>My kind class (i.e. my Datastore table) I am trying to create/upload is called "FTSE". I then run this command in Terminal:</p>
  
  <pre><code>appcfg.py upload_data --config_file=FTSEdataloader.py --filename=FTSEdata.csv --      kind=FTSE --url=http://&lt;myapp.appspot.com&gt;/_ah/remote_api
  </code></pre>
  
  <p>I get the following error:</p>
  
  <p>File "FTSEdataloader.py", line 4, in 
      import models
  ImportError: No module named models</p>
  
  <p>I do not have a "models.py" like in the GAE demonstration. What should take its place?</p>
  
  <p>Thanks</p>