How to run a pyramid app in Google App engine





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







2















I have been trying to get pyramid to run in google app engine but is not working out.
I have tried to follow the instruction here but it seems obsolete because gae doesn't have appcfg.py anymore. I followed the flask app tutorial on app engine documentation combining it with the one above to get this: app.yaml



runtime: python
env: flex

runtime_config:
python_version: 3
threadsafe: false

handlers:
- url: /static
static_dir: contractors/static
- url: /.*
script: auto


then main.py:



from pyramid.paster import get_app, setup_logging
ini_path = 'production.ini'
setup_logging(ini_path)
app = get_app(ini_path, 'main')


In appengine shell console, I cloned the project repo, installed everything in a virtualenv then tried to run python main.py
But it returns that the Distribution for my project was not found. I then used easy_install paste then the distribution error resolved but python main.py still couldn't run. Help!



Actually, this is frustrating. i keep wondering why aws,gcloud and azure clouds didn't include pyramid tutorial while flask and django are all there. The community doesn't also have working tutorial for these cloud services. Being a newbie, i'm thinking there's something wrong with pyramid.










share|improve this question































    2















    I have been trying to get pyramid to run in google app engine but is not working out.
    I have tried to follow the instruction here but it seems obsolete because gae doesn't have appcfg.py anymore. I followed the flask app tutorial on app engine documentation combining it with the one above to get this: app.yaml



    runtime: python
    env: flex

    runtime_config:
    python_version: 3
    threadsafe: false

    handlers:
    - url: /static
    static_dir: contractors/static
    - url: /.*
    script: auto


    then main.py:



    from pyramid.paster import get_app, setup_logging
    ini_path = 'production.ini'
    setup_logging(ini_path)
    app = get_app(ini_path, 'main')


    In appengine shell console, I cloned the project repo, installed everything in a virtualenv then tried to run python main.py
    But it returns that the Distribution for my project was not found. I then used easy_install paste then the distribution error resolved but python main.py still couldn't run. Help!



    Actually, this is frustrating. i keep wondering why aws,gcloud and azure clouds didn't include pyramid tutorial while flask and django are all there. The community doesn't also have working tutorial for these cloud services. Being a newbie, i'm thinking there's something wrong with pyramid.










    share|improve this question



























      2












      2








      2








      I have been trying to get pyramid to run in google app engine but is not working out.
      I have tried to follow the instruction here but it seems obsolete because gae doesn't have appcfg.py anymore. I followed the flask app tutorial on app engine documentation combining it with the one above to get this: app.yaml



      runtime: python
      env: flex

      runtime_config:
      python_version: 3
      threadsafe: false

      handlers:
      - url: /static
      static_dir: contractors/static
      - url: /.*
      script: auto


      then main.py:



      from pyramid.paster import get_app, setup_logging
      ini_path = 'production.ini'
      setup_logging(ini_path)
      app = get_app(ini_path, 'main')


      In appengine shell console, I cloned the project repo, installed everything in a virtualenv then tried to run python main.py
      But it returns that the Distribution for my project was not found. I then used easy_install paste then the distribution error resolved but python main.py still couldn't run. Help!



      Actually, this is frustrating. i keep wondering why aws,gcloud and azure clouds didn't include pyramid tutorial while flask and django are all there. The community doesn't also have working tutorial for these cloud services. Being a newbie, i'm thinking there's something wrong with pyramid.










      share|improve this question
















      I have been trying to get pyramid to run in google app engine but is not working out.
      I have tried to follow the instruction here but it seems obsolete because gae doesn't have appcfg.py anymore. I followed the flask app tutorial on app engine documentation combining it with the one above to get this: app.yaml



      runtime: python
      env: flex

      runtime_config:
      python_version: 3
      threadsafe: false

      handlers:
      - url: /static
      static_dir: contractors/static
      - url: /.*
      script: auto


      then main.py:



      from pyramid.paster import get_app, setup_logging
      ini_path = 'production.ini'
      setup_logging(ini_path)
      app = get_app(ini_path, 'main')


      In appengine shell console, I cloned the project repo, installed everything in a virtualenv then tried to run python main.py
      But it returns that the Distribution for my project was not found. I then used easy_install paste then the distribution error resolved but python main.py still couldn't run. Help!



      Actually, this is frustrating. i keep wondering why aws,gcloud and azure clouds didn't include pyramid tutorial while flask and django are all there. The community doesn't also have working tutorial for these cloud services. Being a newbie, i'm thinking there's something wrong with pyramid.







      pyramid gcloud






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 23 '18 at 0:43







      splbuddy

















      asked Nov 22 '18 at 10:02









      splbuddysplbuddy

      629




      629
























          1 Answer
          1






          active

          oldest

          votes


















          4














          It seems like this Pyramid tutorial it's outdated. Also I think it is made to work with App Engine standard, as the 'dev_appserver.py' command does not work with the flexible environment (notice the env:flex tag in your app.yaml file).



          Besides, I managed to get pyramid to work on App Engine Standard, similarly to a Flask application, by following this Pyramid Documentation:



          Notice the line where you are configuring the server, if you use this direction and port(127.0.0.1:8080), you will be able to view the webpage from the Cloud Shell preview 'locally'.



          The main.py file:



          from wsgiref.simple_server import make_server
          from pyramid.config import Configurator
          from pyramid.response import Response


          def hello_world(request):
          return Response('Hello World!')

          def bye_world(request):
          return Response('Bye!')

          config = Configurator()

          config.add_route('hello', '/')
          config.add_view(hello_world, route_name='hello')

          config.add_route('newHandler', '/bye')
          config.add_view(bye_world, route_name='newHandler')

          app = config.make_wsgi_app()

          if __name__ == '__main__':
          server = make_server('127.0.0.1', 8080, app)
          server.serve_forever()


          app.yaml:



          runtime: python27
          api_version: 1
          service: default
          threadsafe: yes

          handlers:
          - url: /.*
          script: main.app


          As you are using third party libraries (pyramid) you need to specify them. First create the requirements.txt file and enter the following lines:



          pyramid
          repoze.lru


          (repoze.lru library seems to be a pyramid requirement)



          Create a directory via the CLI (named lib in this example), in the same path as the rest of the files, and install the libraries:



          mkdir lib 
          pip install -t lib -r requirements.txt


          This command will install all the libraries listed in the 'requirements.txt' file and copy them to the 'lib' folder.



          Now create a file called appengine_config.py that will direct the App Engine deployment to upload the libraries inside the 'lib' folder, and type in:



          from google.appengine.ext import vendor

          vendor.add('lib')


          As a side note, you don't need to do this with Flask as it's a bundled library in App Engine, therefore you don't need to specifically upload the library.



          Finally to test the application 'locally' in Cloud Shell, you can run in your CLI:



          python main.py


          And then use the preview function in the Cloud Shell.



          To deploy the application from your CLI:



          gcloud app deploy


          And see it in your browser by using the command:



          gcloud app browse -s <service_name_defined_in_app.yaml>


          In this example this command would be



          gcloud app browse -s default





          share|improve this answer


























          • If you submit a PR to the Pyramid Community Cookbook, I'd accept it.

            – Steve Piercy
            Nov 23 '18 at 15:06











          • Thanks for the answer, this worked for a single file app but i'm getting the error "pkg_resources.DistributionNotFound: The 'contractors' distribution was not found and is required by the application" on the cloud and i'm still unable to resolve the error .

            – splbuddy
            Nov 24 '18 at 23:16











          • @splbuddy Do you have the folder named 'contractors' in the same path as the app.yaml? The 'static_dir' element will search in the folder you specified (in your case 'contractors/static') and upload any files inside to your App Engine application. When you do a request to '/static' in your application, i.e. '/static/<static_file>', this handler will serve the file stored in 'contractors/static/<static_file>'. See more about how this handler works here

            – Joan Grau
            Nov 26 '18 at 8:39













          • @Steve Piercy Sure I will take a look! Also if there is something unclear about the explaination let me know.

            – Joan Grau
            Nov 26 '18 at 8:41











          • Yes @Joan Grau, I have the folder in the same path with app.yaml, my issues are DistributionNotFound error. And I guess it's because the cloud shell has python 3.5 while appengine is running python3.7, I'll try python2 and see what happens. Thanks once more for the help.

            – splbuddy
            Nov 26 '18 at 11:31












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428375%2fhow-to-run-a-pyramid-app-in-google-app-engine%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          It seems like this Pyramid tutorial it's outdated. Also I think it is made to work with App Engine standard, as the 'dev_appserver.py' command does not work with the flexible environment (notice the env:flex tag in your app.yaml file).



          Besides, I managed to get pyramid to work on App Engine Standard, similarly to a Flask application, by following this Pyramid Documentation:



          Notice the line where you are configuring the server, if you use this direction and port(127.0.0.1:8080), you will be able to view the webpage from the Cloud Shell preview 'locally'.



          The main.py file:



          from wsgiref.simple_server import make_server
          from pyramid.config import Configurator
          from pyramid.response import Response


          def hello_world(request):
          return Response('Hello World!')

          def bye_world(request):
          return Response('Bye!')

          config = Configurator()

          config.add_route('hello', '/')
          config.add_view(hello_world, route_name='hello')

          config.add_route('newHandler', '/bye')
          config.add_view(bye_world, route_name='newHandler')

          app = config.make_wsgi_app()

          if __name__ == '__main__':
          server = make_server('127.0.0.1', 8080, app)
          server.serve_forever()


          app.yaml:



          runtime: python27
          api_version: 1
          service: default
          threadsafe: yes

          handlers:
          - url: /.*
          script: main.app


          As you are using third party libraries (pyramid) you need to specify them. First create the requirements.txt file and enter the following lines:



          pyramid
          repoze.lru


          (repoze.lru library seems to be a pyramid requirement)



          Create a directory via the CLI (named lib in this example), in the same path as the rest of the files, and install the libraries:



          mkdir lib 
          pip install -t lib -r requirements.txt


          This command will install all the libraries listed in the 'requirements.txt' file and copy them to the 'lib' folder.



          Now create a file called appengine_config.py that will direct the App Engine deployment to upload the libraries inside the 'lib' folder, and type in:



          from google.appengine.ext import vendor

          vendor.add('lib')


          As a side note, you don't need to do this with Flask as it's a bundled library in App Engine, therefore you don't need to specifically upload the library.



          Finally to test the application 'locally' in Cloud Shell, you can run in your CLI:



          python main.py


          And then use the preview function in the Cloud Shell.



          To deploy the application from your CLI:



          gcloud app deploy


          And see it in your browser by using the command:



          gcloud app browse -s <service_name_defined_in_app.yaml>


          In this example this command would be



          gcloud app browse -s default





          share|improve this answer


























          • If you submit a PR to the Pyramid Community Cookbook, I'd accept it.

            – Steve Piercy
            Nov 23 '18 at 15:06











          • Thanks for the answer, this worked for a single file app but i'm getting the error "pkg_resources.DistributionNotFound: The 'contractors' distribution was not found and is required by the application" on the cloud and i'm still unable to resolve the error .

            – splbuddy
            Nov 24 '18 at 23:16











          • @splbuddy Do you have the folder named 'contractors' in the same path as the app.yaml? The 'static_dir' element will search in the folder you specified (in your case 'contractors/static') and upload any files inside to your App Engine application. When you do a request to '/static' in your application, i.e. '/static/<static_file>', this handler will serve the file stored in 'contractors/static/<static_file>'. See more about how this handler works here

            – Joan Grau
            Nov 26 '18 at 8:39













          • @Steve Piercy Sure I will take a look! Also if there is something unclear about the explaination let me know.

            – Joan Grau
            Nov 26 '18 at 8:41











          • Yes @Joan Grau, I have the folder in the same path with app.yaml, my issues are DistributionNotFound error. And I guess it's because the cloud shell has python 3.5 while appengine is running python3.7, I'll try python2 and see what happens. Thanks once more for the help.

            – splbuddy
            Nov 26 '18 at 11:31
















          4














          It seems like this Pyramid tutorial it's outdated. Also I think it is made to work with App Engine standard, as the 'dev_appserver.py' command does not work with the flexible environment (notice the env:flex tag in your app.yaml file).



          Besides, I managed to get pyramid to work on App Engine Standard, similarly to a Flask application, by following this Pyramid Documentation:



          Notice the line where you are configuring the server, if you use this direction and port(127.0.0.1:8080), you will be able to view the webpage from the Cloud Shell preview 'locally'.



          The main.py file:



          from wsgiref.simple_server import make_server
          from pyramid.config import Configurator
          from pyramid.response import Response


          def hello_world(request):
          return Response('Hello World!')

          def bye_world(request):
          return Response('Bye!')

          config = Configurator()

          config.add_route('hello', '/')
          config.add_view(hello_world, route_name='hello')

          config.add_route('newHandler', '/bye')
          config.add_view(bye_world, route_name='newHandler')

          app = config.make_wsgi_app()

          if __name__ == '__main__':
          server = make_server('127.0.0.1', 8080, app)
          server.serve_forever()


          app.yaml:



          runtime: python27
          api_version: 1
          service: default
          threadsafe: yes

          handlers:
          - url: /.*
          script: main.app


          As you are using third party libraries (pyramid) you need to specify them. First create the requirements.txt file and enter the following lines:



          pyramid
          repoze.lru


          (repoze.lru library seems to be a pyramid requirement)



          Create a directory via the CLI (named lib in this example), in the same path as the rest of the files, and install the libraries:



          mkdir lib 
          pip install -t lib -r requirements.txt


          This command will install all the libraries listed in the 'requirements.txt' file and copy them to the 'lib' folder.



          Now create a file called appengine_config.py that will direct the App Engine deployment to upload the libraries inside the 'lib' folder, and type in:



          from google.appengine.ext import vendor

          vendor.add('lib')


          As a side note, you don't need to do this with Flask as it's a bundled library in App Engine, therefore you don't need to specifically upload the library.



          Finally to test the application 'locally' in Cloud Shell, you can run in your CLI:



          python main.py


          And then use the preview function in the Cloud Shell.



          To deploy the application from your CLI:



          gcloud app deploy


          And see it in your browser by using the command:



          gcloud app browse -s <service_name_defined_in_app.yaml>


          In this example this command would be



          gcloud app browse -s default





          share|improve this answer


























          • If you submit a PR to the Pyramid Community Cookbook, I'd accept it.

            – Steve Piercy
            Nov 23 '18 at 15:06











          • Thanks for the answer, this worked for a single file app but i'm getting the error "pkg_resources.DistributionNotFound: The 'contractors' distribution was not found and is required by the application" on the cloud and i'm still unable to resolve the error .

            – splbuddy
            Nov 24 '18 at 23:16











          • @splbuddy Do you have the folder named 'contractors' in the same path as the app.yaml? The 'static_dir' element will search in the folder you specified (in your case 'contractors/static') and upload any files inside to your App Engine application. When you do a request to '/static' in your application, i.e. '/static/<static_file>', this handler will serve the file stored in 'contractors/static/<static_file>'. See more about how this handler works here

            – Joan Grau
            Nov 26 '18 at 8:39













          • @Steve Piercy Sure I will take a look! Also if there is something unclear about the explaination let me know.

            – Joan Grau
            Nov 26 '18 at 8:41











          • Yes @Joan Grau, I have the folder in the same path with app.yaml, my issues are DistributionNotFound error. And I guess it's because the cloud shell has python 3.5 while appengine is running python3.7, I'll try python2 and see what happens. Thanks once more for the help.

            – splbuddy
            Nov 26 '18 at 11:31














          4












          4








          4







          It seems like this Pyramid tutorial it's outdated. Also I think it is made to work with App Engine standard, as the 'dev_appserver.py' command does not work with the flexible environment (notice the env:flex tag in your app.yaml file).



          Besides, I managed to get pyramid to work on App Engine Standard, similarly to a Flask application, by following this Pyramid Documentation:



          Notice the line where you are configuring the server, if you use this direction and port(127.0.0.1:8080), you will be able to view the webpage from the Cloud Shell preview 'locally'.



          The main.py file:



          from wsgiref.simple_server import make_server
          from pyramid.config import Configurator
          from pyramid.response import Response


          def hello_world(request):
          return Response('Hello World!')

          def bye_world(request):
          return Response('Bye!')

          config = Configurator()

          config.add_route('hello', '/')
          config.add_view(hello_world, route_name='hello')

          config.add_route('newHandler', '/bye')
          config.add_view(bye_world, route_name='newHandler')

          app = config.make_wsgi_app()

          if __name__ == '__main__':
          server = make_server('127.0.0.1', 8080, app)
          server.serve_forever()


          app.yaml:



          runtime: python27
          api_version: 1
          service: default
          threadsafe: yes

          handlers:
          - url: /.*
          script: main.app


          As you are using third party libraries (pyramid) you need to specify them. First create the requirements.txt file and enter the following lines:



          pyramid
          repoze.lru


          (repoze.lru library seems to be a pyramid requirement)



          Create a directory via the CLI (named lib in this example), in the same path as the rest of the files, and install the libraries:



          mkdir lib 
          pip install -t lib -r requirements.txt


          This command will install all the libraries listed in the 'requirements.txt' file and copy them to the 'lib' folder.



          Now create a file called appengine_config.py that will direct the App Engine deployment to upload the libraries inside the 'lib' folder, and type in:



          from google.appengine.ext import vendor

          vendor.add('lib')


          As a side note, you don't need to do this with Flask as it's a bundled library in App Engine, therefore you don't need to specifically upload the library.



          Finally to test the application 'locally' in Cloud Shell, you can run in your CLI:



          python main.py


          And then use the preview function in the Cloud Shell.



          To deploy the application from your CLI:



          gcloud app deploy


          And see it in your browser by using the command:



          gcloud app browse -s <service_name_defined_in_app.yaml>


          In this example this command would be



          gcloud app browse -s default





          share|improve this answer















          It seems like this Pyramid tutorial it's outdated. Also I think it is made to work with App Engine standard, as the 'dev_appserver.py' command does not work with the flexible environment (notice the env:flex tag in your app.yaml file).



          Besides, I managed to get pyramid to work on App Engine Standard, similarly to a Flask application, by following this Pyramid Documentation:



          Notice the line where you are configuring the server, if you use this direction and port(127.0.0.1:8080), you will be able to view the webpage from the Cloud Shell preview 'locally'.



          The main.py file:



          from wsgiref.simple_server import make_server
          from pyramid.config import Configurator
          from pyramid.response import Response


          def hello_world(request):
          return Response('Hello World!')

          def bye_world(request):
          return Response('Bye!')

          config = Configurator()

          config.add_route('hello', '/')
          config.add_view(hello_world, route_name='hello')

          config.add_route('newHandler', '/bye')
          config.add_view(bye_world, route_name='newHandler')

          app = config.make_wsgi_app()

          if __name__ == '__main__':
          server = make_server('127.0.0.1', 8080, app)
          server.serve_forever()


          app.yaml:



          runtime: python27
          api_version: 1
          service: default
          threadsafe: yes

          handlers:
          - url: /.*
          script: main.app


          As you are using third party libraries (pyramid) you need to specify them. First create the requirements.txt file and enter the following lines:



          pyramid
          repoze.lru


          (repoze.lru library seems to be a pyramid requirement)



          Create a directory via the CLI (named lib in this example), in the same path as the rest of the files, and install the libraries:



          mkdir lib 
          pip install -t lib -r requirements.txt


          This command will install all the libraries listed in the 'requirements.txt' file and copy them to the 'lib' folder.



          Now create a file called appengine_config.py that will direct the App Engine deployment to upload the libraries inside the 'lib' folder, and type in:



          from google.appengine.ext import vendor

          vendor.add('lib')


          As a side note, you don't need to do this with Flask as it's a bundled library in App Engine, therefore you don't need to specifically upload the library.



          Finally to test the application 'locally' in Cloud Shell, you can run in your CLI:



          python main.py


          And then use the preview function in the Cloud Shell.



          To deploy the application from your CLI:



          gcloud app deploy


          And see it in your browser by using the command:



          gcloud app browse -s <service_name_defined_in_app.yaml>


          In this example this command would be



          gcloud app browse -s default






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 24 '18 at 13:40

























          answered Nov 23 '18 at 9:17









          Joan GrauJoan Grau

          1,452215




          1,452215













          • If you submit a PR to the Pyramid Community Cookbook, I'd accept it.

            – Steve Piercy
            Nov 23 '18 at 15:06











          • Thanks for the answer, this worked for a single file app but i'm getting the error "pkg_resources.DistributionNotFound: The 'contractors' distribution was not found and is required by the application" on the cloud and i'm still unable to resolve the error .

            – splbuddy
            Nov 24 '18 at 23:16











          • @splbuddy Do you have the folder named 'contractors' in the same path as the app.yaml? The 'static_dir' element will search in the folder you specified (in your case 'contractors/static') and upload any files inside to your App Engine application. When you do a request to '/static' in your application, i.e. '/static/<static_file>', this handler will serve the file stored in 'contractors/static/<static_file>'. See more about how this handler works here

            – Joan Grau
            Nov 26 '18 at 8:39













          • @Steve Piercy Sure I will take a look! Also if there is something unclear about the explaination let me know.

            – Joan Grau
            Nov 26 '18 at 8:41











          • Yes @Joan Grau, I have the folder in the same path with app.yaml, my issues are DistributionNotFound error. And I guess it's because the cloud shell has python 3.5 while appengine is running python3.7, I'll try python2 and see what happens. Thanks once more for the help.

            – splbuddy
            Nov 26 '18 at 11:31



















          • If you submit a PR to the Pyramid Community Cookbook, I'd accept it.

            – Steve Piercy
            Nov 23 '18 at 15:06











          • Thanks for the answer, this worked for a single file app but i'm getting the error "pkg_resources.DistributionNotFound: The 'contractors' distribution was not found and is required by the application" on the cloud and i'm still unable to resolve the error .

            – splbuddy
            Nov 24 '18 at 23:16











          • @splbuddy Do you have the folder named 'contractors' in the same path as the app.yaml? The 'static_dir' element will search in the folder you specified (in your case 'contractors/static') and upload any files inside to your App Engine application. When you do a request to '/static' in your application, i.e. '/static/<static_file>', this handler will serve the file stored in 'contractors/static/<static_file>'. See more about how this handler works here

            – Joan Grau
            Nov 26 '18 at 8:39













          • @Steve Piercy Sure I will take a look! Also if there is something unclear about the explaination let me know.

            – Joan Grau
            Nov 26 '18 at 8:41











          • Yes @Joan Grau, I have the folder in the same path with app.yaml, my issues are DistributionNotFound error. And I guess it's because the cloud shell has python 3.5 while appengine is running python3.7, I'll try python2 and see what happens. Thanks once more for the help.

            – splbuddy
            Nov 26 '18 at 11:31

















          If you submit a PR to the Pyramid Community Cookbook, I'd accept it.

          – Steve Piercy
          Nov 23 '18 at 15:06





          If you submit a PR to the Pyramid Community Cookbook, I'd accept it.

          – Steve Piercy
          Nov 23 '18 at 15:06













          Thanks for the answer, this worked for a single file app but i'm getting the error "pkg_resources.DistributionNotFound: The 'contractors' distribution was not found and is required by the application" on the cloud and i'm still unable to resolve the error .

          – splbuddy
          Nov 24 '18 at 23:16





          Thanks for the answer, this worked for a single file app but i'm getting the error "pkg_resources.DistributionNotFound: The 'contractors' distribution was not found and is required by the application" on the cloud and i'm still unable to resolve the error .

          – splbuddy
          Nov 24 '18 at 23:16













          @splbuddy Do you have the folder named 'contractors' in the same path as the app.yaml? The 'static_dir' element will search in the folder you specified (in your case 'contractors/static') and upload any files inside to your App Engine application. When you do a request to '/static' in your application, i.e. '/static/<static_file>', this handler will serve the file stored in 'contractors/static/<static_file>'. See more about how this handler works here

          – Joan Grau
          Nov 26 '18 at 8:39







          @splbuddy Do you have the folder named 'contractors' in the same path as the app.yaml? The 'static_dir' element will search in the folder you specified (in your case 'contractors/static') and upload any files inside to your App Engine application. When you do a request to '/static' in your application, i.e. '/static/<static_file>', this handler will serve the file stored in 'contractors/static/<static_file>'. See more about how this handler works here

          – Joan Grau
          Nov 26 '18 at 8:39















          @Steve Piercy Sure I will take a look! Also if there is something unclear about the explaination let me know.

          – Joan Grau
          Nov 26 '18 at 8:41





          @Steve Piercy Sure I will take a look! Also if there is something unclear about the explaination let me know.

          – Joan Grau
          Nov 26 '18 at 8:41













          Yes @Joan Grau, I have the folder in the same path with app.yaml, my issues are DistributionNotFound error. And I guess it's because the cloud shell has python 3.5 while appengine is running python3.7, I'll try python2 and see what happens. Thanks once more for the help.

          – splbuddy
          Nov 26 '18 at 11:31





          Yes @Joan Grau, I have the folder in the same path with app.yaml, my issues are DistributionNotFound error. And I guess it's because the cloud shell has python 3.5 while appengine is running python3.7, I'll try python2 and see what happens. Thanks once more for the help.

          – splbuddy
          Nov 26 '18 at 11:31




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428375%2fhow-to-run-a-pyramid-app-in-google-app-engine%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Guess what letter conforming each word

          Port of Spain

          Run scheduled task as local user group (not BUILTIN)