Google AppEngine Search, Python API missing from SDK?

697 views
Skip to first unread message

Nick Papadonis

unread,
Feb 7, 2017, 7:10:19 PM2/7/17
to Google App Engine
Hi Folks,

I would like to use this API, however after installing google-appengine via PIP (1.5.1 latest), I'm unable to find the Search API in the module.

# pip list |grep appengine
google-appengine (1.5.1)

$ ls env/lib/python2.7/site-packages/google/appengine/api | grep search
prospective_search

^ expecting search.py or search subdirectory

Yet, I see all the Google Cloud Docs referencing this functionality.

From my app:
from google.appengine.api import search

Traceback (most recent call last):
  File "cds.py", line 4, in <module>
    from google.appengine.api import search
ImportError: cannot import name search

Any insight appreciated.

Thanks so much,
Nick

Anastasios Hatzis

unread,
Feb 8, 2017, 3:08:40 AM2/8/17
to Google App Engine
Nick,

maybe the PIP installer is incomplete or outdated. Current version of App Engine SDK for Python is 1.9.50 (2017-01-23). The most recent version on PIP is provided by this package: https://pypi.python.org/pypi/appengine-sdk/1.9.50.post0

To install from official sources, you have two options: Either via gcloud by following the instructions here: https://cloud.google.com/appengine/docs/python/download

Or, if you prefer App Engine SDK (with the Launcher), click on the link at the end of the same page to get the download links and instructions for Linux, Mac, or Windows.

Nick Papadonis

unread,
Feb 8, 2017, 9:32:45 AM2/8/17
to Google App Engine
Thanks!  You got it, the improper SDK was installed.

I ran 'pip install appengine-sdk' and the search functionality is there now!

Nick

Nicholas (Google Cloud Support)

unread,
Feb 8, 2017, 1:48:18 PM2/8/17
to Google App Engine
Hey Nick,

I'm glad you were able to get the App Engine SDK for Python up and running.  While it is possible to install the SDK using pip, it is definitely not recommended.  There are currently 2 supported methods for using the GAE SDK for Python
  1. Download the Cloud SDK and install the app-engine-python component.  This can be done with gcloud components install app-engine-python
  2. Install the original App Engine SDK for Python whose link is towards the bottom of the page.
The preferred method is using the Cloud SDK.  You can continue to use pip but please know that as it is not an officially supported method of acquiring the SDK, it may fall out of sync with the official releases and eventually not work as expected.

Attila-Mihaly Balazs

unread,
Mar 1, 2017, 9:09:43 AM3/1/17
to Google App Engine
FYI, AFAIK the prospective search function in GAE is deprecated and will be removed soon. So take care using it!

Attila
Reply all
Reply to author
Forward
0 new messages