Google App Engine Python -> configure yaml and websockets
Question: I`m beginning programmist with google API working in python. I have pycharm
3.4.1 version.

I 'm trying to make a project (backend) of game bomberman. It is like i have
to use content of already written game in javascript. I have my project folder
and there i have this content: ![link at the bottom][1]

  1. I don't understand how exactly i should modify my yaml file to use content of web folder. I need handlers to java script, css and etc. using content of web. If someone could show me example of javascript import then I think I would be able to do analogically the same with others handlers.

  2. What's more. I ve been searching information about implementation websockets in python using google API but I just cant find anything useful or I just don't understand the info. I would appreciate if somebody could show me how to implement websockets and add short explanation. Please be easygoing on me because it's my first approach to google API and i don't know much about it. 

Thanks for help and sorry for mistakes if I did any in the text:)

[1]<http://i.stack.imgur.com/aNJCz.png>


Answer: 1 - To handle static files in your App Engine instance, you can add something
similar to the following in your app.yaml file:

    
    
    handlers:
    - url: /css
      static_dir: static/css
    
    - url: /js
      static_dir: static/js
    

Just place your files in the static/css or static/js directories in your
project. This allows you to access the css and javascript files from the /css
and /js paths on your site. An example js import in your html file would be:

    
    
    <script src=“/js/your-file.js"></script>
    

More options for configuring your static files is in the App Engine docs at:
<https://cloud.google.com/appengine/docs/python/config/appconfig>

2 - App Engine has the Channel Python API available. You can find more info on
that at;

<https://cloud.google.com/appengine/docs/python/channel/>

However, depending on your needs, some have indicated this is too slow for
some situations. You can also create a Compute Engine instance and run Node.js
with socket.io for real-time communication between users. This is a little
more involved than the basic App Engine instance but you can see that
environment layout in this real-time game example:

<https://cloud.google.com/appengine/docs/python/channel/>

