user462455 user462455 - 15 days ago 6
Python Question

Delete local data generated by Google App Engine's dev_appserver.py

I run my application locally using

dev_appserver.py


using the following command

dev_appserver.py mydir --port=xxxx


Is there a way to delete all the
local data
generated by app engine server.

Currently, I go to localhost:8000/datastore, and delete entity groups manually.


  1. IS there a way to automate it

  2. Where does dev_appserver.py write local data to? (File or directory? may be in can delete that)


Answer

Yes there is!

dev_appserver.py accepts some arguments that clears things before it starts up. Two arguments that I use consistently are:

dev_appserver.py --clear_datastore=true --clear_search_indexes=true ...

dev_appserver.py --help can probably give you more information about other things that you may want to clear -- But this always gets everything I need it too.

Comments