The story of exclude / include that Serverless Framework beginners misunderstood (did not understand) in beginner Pythonista

Exclude everything (**), then include only the necessary ones (mymoduledir / **), but remove the unnecessary ones (** / __ pycache __ / **) ("! ** / __ pycache __ / ** ") is the royal road, isn't it?

serverless.yml


package:
  exclude:
    - "**"
  include:
    - mymoduledir/**
    - "!**/__pycache__/**"

By the way, since serverless-python-requirements is used for packaging the pip module, it is automatically generated . requirements.zip and ʻunzip_requirements.py` etc. are added regardless of the settings.

Recommended Posts

The story of exclude / include that Serverless Framework beginners misunderstood (did not understand) in beginner Pythonista
The story that yapf did not work in vscode
The story that `while queue` did not work in python
The story that 2D list replacement did not work in python
The story that sendmail that can be executed in the terminal did not work with cron
The story of debugging in the local environment because the compilation did not work with Read the Docs
[Python] Tensorflow 2.0 did not support Python 3.8, so the story of downgrading Python
The story that the version of python 3.7.7 was not adapted to Heroku
The story of the release work of the application that Google does not tell
The problem that the version of Vue CLI did not go up
The story of participating in AtCoder
The story of the "hole" in the file
Results that did not get caught in the search with this word
About the case that the speaker did not make sound in Ubuntu LTS 20.04
The story of an error in PyOCR
Understand the benefits of the Django Rest Framework
I was in trouble because the behavior of docker container did not change