Endpoints Proto Datastore API は App Engine SDK の正式な部分ではありませんが、私が取り組んできたライブラリです。
それは文書化されており、喜んでここに来て、あなたの質問に答えます。がEndpointsModel
のサブクラスでndb.Model
あるため、両方の長所を活用できます。
>>> from endpoints_proto_datastore.ndb import EndpointsModel
>>> from google.appengine.ext import ndb
>>> EndpointsModel.__bases__ == (ndb.Model,)
True
ドキュメントのランディング ページで述べたように、ライブラリの利点は次のとおりです。
...既存のモデル クラスを Google Cloud Endpoints で使用できるようにします。ndb.Model
クラスとライブラリによって提供される機能を拡張することによりendpoints
、このライブラリを使用すると、ProtoRPC リクエストではなく、API メソッドでモデル エンティティを直接操作できます。
また、図書館の利用についての講演も行いました。endpoints_proto_datastore
その中で、ライブラリをアプリケーションに追加する必要があることを明示的に述べています。
$ cd path/to/your/application/code
$ wget https://endpoints-proto-datastore.googlecode.com/files/endpoints_proto_datastore.zip
$ unqip -q endpoints_proto_datastore.zip