"Serverless" deployments


Having an issue with markupsafe here as well with apistar and zappa…

I thought I could workaround by not using the from apistar.handlers import docs_urls, static_urls, but apparently that’s not the case.
(and yes I’ve added and installed jinja2 and markupsafe in my venv and requirements.txt)

zappa tail log…

[1508320290740] Instancing..
[1508320290749] Failed to find library...right filename?
[1508320291650] No module named 'markupsafe': ModuleNotFoundError
  from apistar import Include, Route, http, Response
  File "/tmp/myproject/apistar/__init__.py", line 14, in <module>
  from apistar.frameworks.cli import CliApp
  File "/tmp/myproject/apistar/frameworks/cli.py", line 4, in <module>
  from apistar import commands, exceptions
  File "/tmp/myproject/apistar/commands/__init__.py", line 1, in <module>
  from apistar.commands.new import new
  File "/tmp/myproject/apistar/commands/new.py", line 6, in <module>
  from apistar.interfaces import Console
  File "/tmp/myproject/apistar/interfaces.py", line 10, in <module>
  import coreapi
  File "/tmp/myproject/coreapi/__init__.py", line 2, in <module>
  from coreapi import auth, codecs, exceptions, transports, utils
  File "/tmp/myproject/coreapi/codecs/__init__.py", line 3, in <module>
  from coreapi.codecs.corejson import CoreJSONCodec
  File "/tmp/myproject/coreapi/codecs/corejson.py", line 8, in <module>
  import coreschema
  File "/tmp/myproject/coreschema/__init__.py", line 6, in <module>
  from coreschema.encodings.html import render_to_form
  File "/tmp/myproject/coreschema/encodings/html.py", line 2, in <module>
  import jinja2
  File "/tmp/myproject/jinja2/__init__.py", line 33, in <module>
  from jinja2.environment import Environment, Template
  File "/tmp/myproject/jinja2/environment.py", line 15, in <module>
  from jinja2 import nodes
  File "/tmp/myproject/jinja2/nodes.py", line 19, in <module>
  from jinja2.utils import Markup
  File "/tmp/myproject/jinja2/utils.py", line 624, in <module>
  from markupsafe import Markup, escape, soft_unicode
ModuleNotFoundError: No module named 'markupsafe'


I did get this working with minimal use case… but still working out why I’m hitting the markupsafe import error with a bigger project…

Anyway, my minimal project is here and it works for me (without static files):