Skip to main content

endpoints-proto-datastore

pypi

This library is intended to be used with the Python version of Google Cloud Endpoints. If you’d like to learn more about Google Cloud Endpoints, please visit our documentation. To run each of these samples, you should include the endpoints_proto_datastore folder included with this project.

By extending the functionality provided by ndb.Model class and the endpoints library, this library allows you to directly interact with model entities in your API methods rather than ProtoRPC requests. For example, instead of:

@endpoints.method(MyModelMessage, MyModelMessage,
                  path='mymodel', http_method='POST',
                  name='mymodel.insert')
def InsertModel(self, request):
  my_model = MyModel(attr1=request.attr1, attr2=request.attr2, ...)
  transformed_model = DoSomething(my_model)
  return MyModelMessage(attr1=transformed_model.attr1,
                        attr2=transformed_model.attr2, ...)

we can directly use the entity in the request:

@MyModel.method(path='mymodel', http_method='POST',
                name='mymodel.insert')
def InsertModel(self, my_model):
  return DoSomething(my_model)

without ever even having to define a ProtoRPC message class!

Get started with the examples.

Project Setup, Installation, and Configuration

To use this library in your App Engine application you can

  • Download the endpoints_proto_datastore library and unzip it in the root of your App Engine application. For example, on a Unix based machine:

    (${GAE_PROJECT_ROOT})$ wget "https://github.com/GoogleCloudPlatform/"`
                                `"endpoints-proto-datastore/blob/"`
                                `"zipfile-branch/"`
                                `"endpoints_proto_datastore.zip?raw=true" \
                           -O endpoints_proto_datastore.zip
    (${GAE_PROJECT_ROOT})$ unzip endpoints_proto_datastore.zip
    (${GAE_PROJECT_ROOT})$ rm endpoints_proto_datastore.zip
  • Alternatively you can stay up to date by adding this repository to your project as a git submodule:

    (${YOUR_GIT_ROOT})$ git submodule add https://github.com/GoogleCloudPlatform/endpoints-proto-datastore

    This will create the entire project in the endpoints-proto-datastore folder in your project. Since Python packages require __init__.py files for imports to work and the root of this project is not meant to be a Python package, you’ll need to add endpoints-proto-datastore to your Python import path.

    The simplest way to do this is to add the following lines to your appengine_config.py file (or create the file if it doesn’t yet exist):

    import os
    import sys
    
    ENDPOINTS_PROJECT_DIR = os.path.join(os.path.dirname(__file__),
                                         'endpoints-proto-datastore')
    sys.path.append(ENDPOINTS_PROJECT_DIR)

    Note: If the App Engine project stored in your git repository is not at the root, you may need to add a symlink to the endpoints-proto-datastore/endpoints_proto_datastore directory and put it at the root of your App Engine project.

To install App Engine visit the Development Environment page.

Features, Questions and Support

  • To request a feature, report a bug, or request a new sample or piece of documentation; please file an issue.

  • For troubleshooting issues or asking general questions, please ask a question on StackOverflow using the endpoints-proto-datastore tag.

Testing

All tests are wrapped into the endpoints_proto_datastore_test_runner.py module. To run the tests, simply execute

$ python ${PATH_TO_TEST_RUNNER}/endpoints_proto_datastore_test_runner.py

This test runner assumes that you have App Engine SDK tools on your path and will use the location of the dev_appserver.py script to determine the location of the SDK. For example, on a Unix based system it would be equivalent to:

$ dirname `readlink \`which dev_appserver.py\``

Contributing changes

  • See CONTRIB.md

  • To create docs for a contributed example, use pycco. For example:

    $ pycco example_name/main.py

Licensing

Metadata

Release files for endpoints-proto-datastore 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for endpoints-proto-datastore 0.10.0
File Size Uploaded Provenance
endpoints-proto-datastore-0.10.0.tar.gz 30.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for endpoints-proto-datastore 0.10.0
File Interpreter ABI Platform
endpoints_proto_datastore-0.10.0-py2-none-any.whl Python 2 none any Details

Total release size: 67.9 kB

Release files / endpoints-proto-datastore-0.10.0.tar.gz

Download URL endpoints-proto-datastore-0.10.0.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
37a6d40f45ec8e4377a442714d7932643621a032922f67e697a1c036adeffe07
BLAKE2b-256 checksum
How to use checksums
a6878d990329f0134cc7d99d88a4398ec5c8beea3d32adc1df804272ba48a4a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / endpoints_proto_datastore-0.10.0-py2-none-any.whl

Download URL endpoints_proto_datastore-0.10.0-py2-none-any.whl
Size 37.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
e72358a41d8cec1f9157e2f8137bf9e90c539608cdd6255cb79c2891a23fbdfa
BLAKE2b-256 checksum
How to use checksums
9a8e3525275c8a04f41a9f858b478e6b0e70c16c25cf444868298ff33979e851
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for endpoints-proto-datastore 0.10.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page