Can I use SQLite libraries on google app engine?

2020-04-10 09:29发布

I'm currently using Google Datastore for storing data. I want to keep an offline version in the form of sql database. Is it possible to use sqlite on google app engine to convert datastore into sql database?

2条回答
Fickle 薄情
2楼-- · 2020-04-10 09:38

No, it is not possible to use sqlite on AppEngine.

Currently there is no option to convert data from the AppEngine datastore to a SQL database.

查看更多
太酷不给撩
3楼-- · 2020-04-10 09:55

You can do this locally since Python Development Server v1.7.6 (link outdated)

https://developers.google.com/appengine/docs/python/tools/old_devserver#Using_the_Datastore

SQLite is now used as the backend for your local Datastore stub. Running an app in the new Development Server for the first time will automatically migrate any existing Datastore files into the SQLite format.

New description from Google:

https://cloud.google.com/appengine/docs/python/tools/devserver

The development web server simulates the App Engine datastore using a SQLite-backed local datastore on your computer.

See also this example.

查看更多
登录 后发表回答