Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manually add entity to empty Google App Engine DataStore

From the tutorial, which I confirmed by creating a simple project, the index.yaml file is auto-generated when a query is run. What I further observe is that until then the admin console (http://localhost:8080/_ah/admin/datastore) does not show the data-store.

My problem is this: I have a project for which data/entities are to be added manually through the datastore admin console. The website is only used to display/retrieve data, not to add data to the data-store.

How do I get my data-store to appear on the console so I can add data?

Yes, try retrieving from the empty data-store through the browser just so I can get the index.yaml to populate, etc. But that does not work.

like image 967
kasavbere Avatar asked Mar 17 '26 03:03

kasavbere


1 Answers

The easiest way is probably just to create a small python script inside your project folder and create your entities in script. Assign it to a URL handler that you'll use once, then disable.

You can even do it from the python shell. It's very useful for debugging, but you'll need to set it up once. http://alex.cloudware.it/2012/02/your-app-engine-app-in-python-shell.html

In order to do the same on production, use the remote_api: https://developers.google.com/appengine/articles/remote_api

like image 60
dragonx Avatar answered Mar 21 '26 05:03

dragonx