python - Serve static files through a custom handler or register in app.yaml? -


in project i'm developing i'm using several python projects dependencies. these projects each come static files (javascript, images, etc.) , set of handlers (with default urls). register urls handlers add them routes in wsgi application. static files need registered in app.yaml. avoid becomes breeze register both handler urls , static files.

i thought implementing request handler takes file location , serves http cache (like think default static handlers do).

i've discussed idea colleague , thought bad idea. told me when registering static files in app.yaml files served in more optimized way (possibly without python).

before go , implement static handler i'd hear pros/cons of both methods , if static handler idea idea.

in current projects let buildout generate app.yaml template. static files added there. (obvious) downside process error prone (if done automatically) or redundant (if done manually).

use static handler:

  • you don't need startup instance serve file. means it'll served quicker, , save on cpu hours.

  • you don't have worry edge caching.

the cons might files static, , might require more manual intervention framework.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -