I am now on python 2.7 and have datastore admin working I want to copy the datastore from one app to another. All the documentation I find refers to Python 2.5 where is the how to do this for Python 2.7
Datastore Admin is independent of the version you're using, so you don't have to worry about it. Please just enable Datastore Admin via the Admin Console.
Related
As Python 2 came to an end and App Engine 1 is no longer supported, we are migrating to App Engine 2. I have a sizable Datastore. Given that the two App Engines need to be on two different projects, is it possible to connect to the old App Engine's datastore as the new App Engines's datastore? Ideally using NDB.
The datastore of a GAE/GCP project can be accessed from an app in another project or even from outside Google Cloud, see How do I use Google datastore for my web app which is NOT hosted in google app engine?.
I didn't yet play with the python 3 ndb library (aka Cloud NDB), I can't exactly say if/how it can use another project's credentials. I'm unsure if you want to try to use it, though: from Migrating to Cloud NDB:
Cloud NDB is intended to replace the features in App Engine NDB, so it
will not support new features of Firestore in Datastore mode. New
Python 3 apps should use the Datastore mode client library
instead of Cloud NDB.
In the worst case the Datastore mode client library (actually the recommended one for python 3 GAE apps) should be able to access your python 2 app's datastore - it is generic, it can be used for any app, not just GAE. According to the docs its Client() method supports specifying a project and credentials (where you'd be using the service account for the python 2 app's project). Potentially of interest: GCP-The App Engine APIs are not available, with py 3
I am using Google Cloud Storage and I want to serve scaled images from it, Python 2 version of Google App Engine supported it via Images API but with Python3, they removed that API.
https://cloud.google.com/appengine/docs/standard/python3/python-differences
Cannot understand the intension behind removing such an import feature, upgrading to Python3 in Google Cloud environment sounds like a downgrade to me.
As you said, the proprietary App Engine APIs are not available in Python3.7. The main reason is because GCP is unbundling App Engine and now, you are no longer dependent on these APIs.
Currently, there are some third parties alternative solutions. In your specific case, and based on GCP documentation, I think that you can try to use Imgix or Rethumb.
Seems like Google is planning on adding it back to Python 3:
https://cloud.google.com/appengine/docs/standard/python3/services/access
To reduce runtime migration complexity, Google Cloud now supports a set of App Engine bundled services and their associated APIs on second-generation runtimes, which include Python 3, Java 11, and Go 1.12 or higher. Your app can call bundled services APIs for second-generation runtimes through language-idiomatic libraries.
I am developing a web application using Google AppEngine (GAE).
I have make some examples using dataStore (free, non-relational) using Google AppEngine Launcher (GAEL). All is correct. However I'd like delete the datastore before to deploy an application.
I have read that I have to use the command
--clear_datastore
I don't know like running the server to delete the data store when I deploy or re-deploy the application.
I have chech some ways, for example I have write in the Application Settings(Edit==>Application Settings) in the GAEL some commands:
--clear_datastore
--clear_datastore /<ApplicationName>
--clear_datastore <ApplicationName>/
--clear_datastore <ApplicationName>
any idea?
Thank you.
Jose
The clear_datastore flag is only used to clear the development datastore which is running on your local machine with the dev_appserver. If you want to clear this development datastore, then when you run the dev appserver you can use the flags:
dev_appserver.sh --clear_datastore=yes <ApplicationName>
An important thing to note is that this only clears the development datastore. The development datastore does not get uploaded when you deploy the application. So you shouldn't be worried about clearing the local datastore before deploying the application.
If you want to delete entities that are already in your production server (running on App Engine), then you cannot do this from the command line using dev_appserver.sh. You can do this using the Datastore Admin tool in the AppEngine console. You can follow the instructions here to bulk delete data. An important note is that you have to enable the Datastore Admin tool first by following these instructions.
I need to change my local datastore path of APP Engine. I have followed methods specified here How can I persist the local datastore for GoogleAppEngineLauncher between reboots? . I tried changing datastore path but it didn't work. I am using App Engine SDK 1.6.4, Python 2.7 and NDB as datastore on Windows 7. Also I could not find default datastore location on my computer as stated in dev_appserver.py -help output (which is a temp location but I searched while application was running and datastore was serving).
My objective is to stop local datastore cleaning itself on each launch (I am using launcher).
The datastore SHOULD persist between reboots.
When you shut down, the server you should see a message "Applying all pending transactions and saving the datastore" in the console. If not, you maybe seeing the following issue (two questions, same issue, first one has a workaround)
GAE SDK 1.6.4 dev_appserver datastore flush
App Engine local datastore content does not persist
I want to export the datastore that I have running in App Engine into my local "standalone" version of the application. Anyone know how I can do that?
I've been looking around in the App Engine dashboard but can't find it.
Check out the docs on uploading and downloading data.
Gobo-Tools is designed for such tasks
It seems that there is no separate doc for java version of this except that it is said to do with com.google.apphosting.utils.remoteapi.RemoteApiServlet in the doc Nick provided.
Tip: If you have a Java app, you can use the Python appcfg.py tool by installing the Java
version of the remote_api handler, which is included with the Java runtime environment.
The handler servlet class is com.google.apphosting.utils.remoteapi.RemoteApiServlet.
Here is some relevant code example for java version of this API usage GAE/J datastore backup