Luke Wyman
08/09/2021, 4:59 AMnpx create-serverless-stack@latest [project name] --language python
. Some thoughts on this:
• The above creates a hybrid of Javascript sst code, Javascript sst tests for MyStack.js
, and Python for the lambdas. The usual package.json, etc.
• Where/how are the Python dependencies needed in my Lambdas managed (since I'm seeing node stuff everywhere else)?
• What happens when I run npx sst test
? I know Jest is a part of serverless stack, so what happens with whatever Python testing framework I'll end up using (for domain object unit tests)? Does the test command detect that and respond accordingly, or do I have to wire that up? Or, do I just run a separate command to run the Python tests?
• My guess is that sst knows how to bundle and deploy Python Lambdas by detecting the .py
extension.
• Integration tests can still still be in typescript, since that's what they are for my typescript microservices and don't intrude into the guts of my Lambdas.Frank
requirements.txt
, PipFile or Poetry to manage the dependencies. Just point srcPath
to where requirements.txt
or Pipfile
or poetry.lock
is.Frank
sst test
in this case doesn’t run the python tests. Having a separate command for Python tests is probably the best way to go about it.Frank
Luke Wyman
08/09/2021, 11:34 PMrequirements.txt
, Pipfile
, or poetry.lock
would you guess is the most popular/progressive, and compatible with my sst effort? Same question for the a unit testing library for Python.Frank
sst deploy
, if you have Pipfile
or poetry.lock
, they simply get converted to requirements.txt
, and the steps after that are exactly the same.Frank
Frank
Luke Wyman
08/12/2021, 12:15 AM