Giter Site home page Giter Site logo

googlearchive / appengine-flask-skeleton Goto Github PK

View Code? Open in Web Editor NEW
414.0 99.0 161.0 1.15 MB

A skeleton for creating Python applications using the Flask framework on App Engine

License: Apache License 2.0

Python 99.04% HTML 0.02% CSS 0.32% C 0.30% JavaScript 0.32%

appengine-flask-skeleton's Introduction

status: inactive

This project is no longer actively developed or maintained.

For new work on this check out flask Hello World.

Python Flask Skeleton for Google App Engine

A skeleton for building Python applications on Google App Engine with the Flask micro framework.

See our other Google Cloud Platform github repos for sample applications and scaffolding for other python frameworks and use cases.

Run Locally

  1. Install the App Engine Python SDK. See the README file for directions. You'll need python 2.7 and pip 1.4 or later installed too.

  2. Clone this repo with

    git clone https://github.com/GoogleCloudPlatform/appengine-flask-skeleton.git
    
  3. Install dependencies in the project's lib directory. Note: App Engine can only import libraries from inside your project directory.

    cd appengine-flask-skeleton
    pip install -r requirements.txt -t lib
    
  4. Run this project locally from the command line:

    dev_appserver.py .
    

Visit the application http://localhost:8080

See the development server documentation for options when running dev_appserver.

Deploy

To deploy the application:

  1. Use the Admin Console to create a project/app id. (App id and project id are identical)

  2. Deploy the application with

    appcfg.py update -A <your-project-id> -V v1 .
    

    If this isn't your first deployment, you will need to set the new version as the default version with

    appcfg.py set_default_version -V v1 -A <your-project-id>
    
  3. Congratulations! Your application is now live at your-app-id.appspot.com

Next Steps

This skeleton includes TODO markers to help you find basic areas you will want to customize.

Relational Databases and Datastore

To add persistence to your models, use NDB for scale. Consider CloudSQL if you need a relational database.

Installing Libraries

See the Third party libraries page for libraries that are already included in the SDK. To include SDK libraries, add them in your app.yaml file. Other than libraries included in the SDK, only pure python libraries may be added to an App Engine project.

Feedback

Star this repo if you found it useful. Use the github issue tracker to give feedback on this repo.

Contributing changes

See CONTRIB.md

Licensing

See LICENSE

Author

Logan Henriquez and Johan Euphrosine

appengine-flask-skeleton's People

Contributors

fredsa avatar henriquez avatar jerjou avatar lesv avatar msbanik avatar proppy avatar waprin avatar webmaven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appengine-flask-skeleton's Issues

pip install line from README fails because "lib" already exists in repo

  1. Install App Engine Python SDK
  2. Clone the repo in the README
  3. 'cd appengine-python-flask-skeleton'
  4. 'pip install -r requirements.txt -t lib'

Command fails because lib already contains the dependencies. Wouldn't it be better to specify something like pip install --upgrade -r requirements.txt in the README?

raise _SystemExceptionFromAppError(e) error: [Errno 13] Permission denied

when I follow this http://flask.pocoo.org/docs/0.11/patterns/packages/
to make the app bigger. I got the error:

File "/Users/projects/flask-app/run.py", line 2, in <module>
  app.run(debug=False)
File "/Users/projects/flask-app/lib/flask/app.py", line 843, in run
  run_simple(host, port, self, **options)
File "/Users/projects/flask-app/lib/werkzeug/serving.py", line 694, in run_simple
  inner()
File "/Users/projects/flask-app/lib/werkzeug/serving.py", line 656, in inner
  fd=fd)
File "/Users/projects/flask-app/lib/werkzeug/serving.py", line 550, in make_server
  passthrough_errors, ssl_context, fd=fd)
File "/Users/projects/flask-app/lib/werkzeug/serving.py", line 464, in __init__
  HTTPServer.__init__(self, (host, int(port)), handler)
File "/usr/local/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 417, in __init__
  self.server_bind()
File "/usr/local/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
  SocketServer.TCPServer.server_bind(self)
File "/usr/local/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 431, in server_bind
  self.socket.bind(self.server_address)
File "/Users/tim/bin/google-cloud-sdk/platform/google_appengine/google/appengine/dist27/socket.py", line 222, in meth
  return getattr(self._sock,name)(*args)
File "/Users/tim/bin/google-cloud-sdk/platform/google_appengine/google/appengine/api/remote_socket/_remote_socket.py", line 676, in bind
  raise _SystemExceptionFromAppError(e)
error: [Errno 13] Permission denied
INFO     2016-11-26 10:32:02,654 module.py:788] default: "GET / HTTP/1.1" 500 -


I do not know why? Even the simplest hello world, it will show this error.

But if I do not use gae dev_appserver.py, but only the flask environment in my machine, it worked well.

Hope your help.

Thanks in advance.

requirement file is not correct

Traceback (most recent call last):
File "/Users/username/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/Users/username/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/Users/username/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = import(path[0])
File "/Users/username/gitProjects/appengine-flask-skeleton/main.py", line 4, in
from flask import Flask
File "/Users/username/gitProjects/appengine-flask-skeleton/lib/flask/init.py", line 17, in
from werkzeug.exceptions import abort
File "/Users/username/gitProjects/appengine-flask-skeleton/lib/werkzeug/init.py", line 20, in
from werkzeug._compat import iteritems
File "/Users/username/gitProjects/appengine-flask-skeleton/lib/werkzeug/werkzeug/init.py", line 152, in
import('werkzeug.exceptions')
File "/Users/username/gitProjects/appengine-flask-skeleton/lib/werkzeug/werkzeug/exceptions.py", line 71, in
from werkzeug.wrappers import Response
File "/Users/username/gitProjects/appengine-flask-skeleton/lib/werkzeug/werkzeug/wrappers.py", line 26, in
from werkzeug.http import HTTP_STATUS_CODES,
File "/Users/username/gitProjects/appengine-flask-skeleton/lib/werkzeug/werkzeug/http.py", line 1012, in
from werkzeug.datastructures import Accept, HeaderSet, ETags, Authorization,
File "/Users/username/gitProjects/appengine-flask-skeleton/lib/werkzeug/werkzeug/datastructures.py", line 2703, in
from werkzeug import exceptions
ImportError: cannot import name exceptions

default app.yaml file doesn't work.

tl;dr :

when I uncomment the following lines in app.yml in the github clone, everything works:

#libraries:
#- name: jinja2
#  version: latest

Hi,

I have fedora 20 (just upgraded from 19) running in a virtualbox under windows 8.

I'm following gae tutorial https://developers.google.com/appengine/docs/python/getting-started-with-flask

there are two ways to run the hello world. 1) git and install libraries and 2) get the zip.
method 2 works but method 1 doesn't.

since I'm using fedora 20, I have pip 1.4 and python 2.7

17:26:39 ~/gae 
> git clone --recursive https://github.com/GoogleCloudPlatform/appengine-python-flask-skeleton
Cloning into 'appengine-python-flask-skeleton'...
remote: Reusing existing pack: 376, done.
remote: Total 376 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (376/376), 779.61 KiB | 403.00 KiB/s, done.
Resolving deltas: 100% (38/38), done.
Checking connectivity... done.
17:27:03 ~/gae 
> cd appengine-python-flask-skeleton/
17:27:31 ~/gae/appengine-python-flask-skeleton 
> pip install -r requirements.txt -t lib
Downloading/unpacking Flask==0.10 (from -r requirements.txt (line 7))
  Downloading Flask-0.10.tar.gz (544kB): 544kB downloaded
  Running setup.py egg_info for package Flask

    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Werkzeug>=0.7 (from Flask==0.10->-r requirements.txt (line 7))
  Downloading Werkzeug-0.9.4.tar.gz (1.1MB): 1.1MB downloaded
  Running setup.py egg_info for package Werkzeug

    warning: no files found matching '*' under directory 'werkzeug/debug/templates'
    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
Downloading/unpacking Jinja2>=2.4 (from Flask==0.10->-r requirements.txt (line 7))
  Downloading Jinja2-2.7.2.tar.gz (378kB): 378kB downloaded
  Running setup.py egg_info for package Jinja2

    warning: no files found matching '*' under directory 'custom_fixers'
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
Downloading/unpacking itsdangerous>=0.21 (from Flask==0.10->-r requirements.txt (line 7))
  Downloading itsdangerous-0.24.tar.gz (46kB): 46kB downloaded
  Running setup.py egg_info for package itsdangerous

    warning: no previously-included files matching '*' found under directory 'docs/_build'
Downloading/unpacking markupsafe (from Jinja2>=2.4->Flask==0.10->-r requirements.txt (line 7))
  Downloading MarkupSafe-0.19.tar.gz
  Running setup.py egg_info for package markupsafe

Installing collected packages: Flask, Werkzeug, Jinja2, itsdangerous, markupsafe
  Running setup.py install for Flask

    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
  Running setup.py install for Werkzeug

    warning: no files found matching '*' under directory 'werkzeug/debug/templates'
    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
  Running setup.py install for Jinja2

    warning: no files found matching '*' under directory 'custom_fixers'
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
  Running setup.py install for itsdangerous

    warning: no previously-included files matching '*' found under directory 'docs/_build'
  Running setup.py install for markupsafe

    building 'markupsafe._speedups' extension
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c markupsafe/_speedups.c -o build/temp.linux-x86_64-2.7/markupsafe/_speedups.o
    gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/markupsafe/_speedups.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/markupsafe/_speedups.so
Successfully installed Flask Werkzeug Jinja2 itsdangerous markupsafe
Cleaning up...
17:27:42 ~/gae/appengine-python-flask-skeleton 
> 

Then, I run the server:

> dev_appserver.py .
INFO     2014-04-16 00:28:41,067 sdk_update_checker.py:242] Checking for updates to the SDK.
INFO     2014-04-16 00:28:41,271 sdk_update_checker.py:286] This SDK release is newer than the advertised release.
INFO     2014-04-16 00:28:41,345 api_server.py:171] Starting API server at: http://localhost:45466
INFO     2014-04-16 00:28:41,362 dispatcher.py:182] Starting module "default" running at: http://localhost:8080
INFO     2014-04-16 00:28:41,363 admin_server.py:117] Starting admin server at: http://localhost:8000

Then, I go to http://localhost:8080/ and I get:

ERROR    2014-04-16 00:29:20,777 wsgi.py:262] 
Traceback (most recent call last):
  File "/home/kirill/gae/google_appengine/google/appengine/runtime/wsgi.py", line 239, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/home/kirill/gae/google_appengine/google/appengine/runtime/wsgi.py", line 298, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/home/kirill/gae/google_appengine/google/appengine/runtime/wsgi.py", line 84, in LoadObject
    obj = __import__(path[0])
  File "/home/kirill/gae/appengine-python-flask-skeleton/main.py", line 4, in <module>
    from flask import Flask
  File "/home/kirill/gae/appengine-python-flask-skeleton/lib/flask/__init__.py", line 19, in <module>
    from jinja2 import Markup, escape
  File "/home/kirill/gae/appengine-python-flask-skeleton/lib/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/home/kirill/gae/appengine-python-flask-skeleton/lib/jinja2/environment.py", line 13, in <module>
    from jinja2 import nodes
  File "/home/kirill/gae/appengine-python-flask-skeleton/lib/jinja2/nodes.py", line 18, in <module>
    from jinja2.utils import Markup
  File "/home/kirill/gae/appengine-python-flask-skeleton/lib/jinja2/utils.py", line 520, in <module>
    from markupsafe import Markup, escape, soft_unicode
ImportError: No module named markupsafe
INFO     2014-04-16 00:29:20,788 module.py:627] default: "GET / HTTP/1.1" 500 -

Then, I kill it.

here is the contents of the lib directories for both cases: 1) and 2):

when I uncomment the following lines in app.yml in the case 1), everything works:

#libraries:
#- name: jinja2
#  version: latest

Doesn't work

Log from GoogleAppEngineLauncher.app 1.8.9.1049

*** Running dev_appserver with the following flags:
    --skip_sdk_update_check=yes --port=8080 --admin_port=8000
Python command: /opt/local/bin/python2.7
INFO     2014-01-18 12:22:14,967 devappserver2.py:671] Skipping SDK update check.
INFO     2014-01-18 12:22:15,003 api_server.py:138] Starting API server at: http://localhost:58042
INFO     2014-01-18 12:22:15,008 dispatcher.py:171] Starting module "default" running at: http://localhost:8080
INFO     2014-01-18 12:22:15,016 admin_server.py:117] Starting admin server at: http://localhost:8000
ERROR    2014-01-18 12:22:24,884 wsgi.py:262] 
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 239, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 298, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 84, in LoadObject
    obj = __import__(path[0])
  File "/Users/robinho/financeiro/main.py", line 10, in <module>
    from flask import Flask
  File "/Users/robinho/financeiro/server/lib/flask/__init__.py", line 17, in <module>
    from werkzeug.exceptions import abort
  File "/Users/robinho/financeiro/server/lib/werkzeug/__init__.py", line 20, in <module>
    from werkzeug._compat import iteritems
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/__init__.py", line 154, in <module>
    __import__('werkzeug.exceptions')
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/exceptions.py", line 71, in <module>
    from werkzeug.wrappers import Response
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/wrappers.py", line 26, in <module>
    from werkzeug.http import HTTP_STATUS_CODES, \
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/http.py", line 971, in <module>
    from werkzeug.datastructures import Accept, HeaderSet, ETags, Authorization, \
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/datastructures.py", line 2612, in <module>
    from werkzeug import exceptions
ImportError: cannot import name exceptions
INFO     2014-01-18 12:22:24,911 module.py:612] default: "GET / HTTP/1.1" 500 -
ERROR    2014-01-18 12:22:25,175 wsgi.py:262] 
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 239, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 298, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 84, in LoadObject
    obj = __import__(path[0])
  File "/Users/robinho/financeiro/main.py", line 10, in <module>
    from flask import Flask
  File "/Users/robinho/financeiro/server/lib/flask/__init__.py", line 17, in <module>
    from werkzeug.exceptions import abort
  File "/Users/robinho/financeiro/server/lib/werkzeug/__init__.py", line 20, in <module>
    from werkzeug._compat import iteritems
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/__init__.py", line 154, in <module>
    __import__('werkzeug.exceptions')
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/exceptions.py", line 71, in <module>
    from werkzeug.wrappers import Response
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/wrappers.py", line 26, in <module>
    from werkzeug.http import HTTP_STATUS_CODES, \
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/http.py", line 971, in <module>
    from werkzeug.datastructures import Accept, HeaderSet, ETags, Authorization, \
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/datastructures.py", line 2612, in <module>
    from werkzeug import exceptions
ImportError: cannot import name exceptions
INFO     2014-01-18 12:22:25,186 module.py:612] default: "GET / HTTP/1.1" 500 -
ERROR    2014-01-18 12:22:26,134 wsgi.py:262] 
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 239, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 298, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 84, in LoadObject
    obj = __import__(path[0])
  File "/Users/robinho/financeiro/main.py", line 10, in <module>
    from flask import Flask
  File "/Users/robinho/financeiro/server/lib/flask/__init__.py", line 17, in <module>
    from werkzeug.exceptions import abort
  File "/Users/robinho/financeiro/server/lib/werkzeug/__init__.py", line 20, in <module>
    from werkzeug._compat import iteritems
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/__init__.py", line 154, in <module>
    __import__('werkzeug.exceptions')
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/exceptions.py", line 71, in <module>
    from werkzeug.wrappers import Response
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/wrappers.py", line 26, in <module>
    from werkzeug.http import HTTP_STATUS_CODES, \
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/http.py", line 971, in <module>
    from werkzeug.datastructures import Accept, HeaderSet, ETags, Authorization, \
  File "/Users/robinho/financeiro/server/lib/werkzeug/werkzeug/datastructures.py", line 2612, in <module>
    from werkzeug import exceptions
ImportError: cannot import name exceptions
INFO     2014-01-18 12:22:26,142 module.py:612] default: "GET /favicon.ico HTTP/1.1" 500 -

'pip install -r requirements.txt -t lib' does not work for namespaced packages

It seems that pip installing namespace packages (examples: repoze.lru, zope.events, zope.interface, etc.) into a local directory like lib/ does not work. Or rather, the packages are installed correctly, but Python ignores the *-nspkg.pth file when packages are not in the usual locations: pypa/pip#1924

Right now, the skeleton inserts lib/ into sys.path to make dependencies importable in the first place: https://github.com/GoogleCloudPlatform/appengine-python-flask-skeleton/blob/master/appengine_config.py#L6

Is there anything similar that can be done to get namespace packages working correctly?

Is this project maintained?

It is linked from the official Google environment, yet shows 3 commits (the latest was november 2013). Wondering whether this is a one off or whether there is someone at Google who is committed to maintaining this project.

Local dev_appserver.py ERROR wsgi.py

I get an error trying to run the dev_appserver on my local machine, OSX 10.11.1

ERROR    2015-12-02 23:10:49,201 wsgi.py:263]
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.