Reputation: 7952
I saw there are two methods for getting data from the datastore: fetch() and run() Regarding fetch the documentation says: Note: You should rarely need to use this method; it is almost always better to use run() instead.
I don't understand the difference between the two. I am new to GAE and Python, please help me understand. Thanks
It says that run() is asynchronous which I don't understand cause unlike JavaScript, once you run the Python script for the site, the html is frozen, right?
Upvotes: 1
Views: 592
Reputation: 16890
Beginner's advice: until you appreciate the difference, stick with fetch(). There are many other things you probably ought to get comfortable with first before this subtle distinction will bother you.
Upvotes: 3
Reputation: 11706
You can run (with run) multiple datastore queries in parallel to improve latency. This has nothing to do with your resulting HTML. The resulting HTML should be the same.
Upvotes: 2