
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
sls-py-extern-pkgs
Advanced tools
Package a Serverless Python Function services with external code
npm i -D sls-py-extern-pkgs
yarn add -D sls-py-extern-pkgs
service: service-name
plugins:
- serverless-package-external
ecr:
images:
# Your images here
# TODO: Currently it doesn't work, but the packages are copied
functions:
# Your functions here
custom:
packageExternal:
common_utils:
# Optional command to run after you have linked common_utils
cmd: pip install -r requirements.txt -t .. > /dev/null 2>&1
source: '../common_utils'
# if no functions specified, it will apply it to all
functions:
- service-a
- service-b
api_utils:
source: '../api_utils'
functions:
- service-b
└── common_utils
└── resource.py
└── api_utils
└── resource.py
└── functions
└── service-a
└── handler.py
└── service-b
└── handler.py
serverless.yml
In service-b/handler.py, external code can be imported:
from common_utils.resource import shared_resource
from api_utils.resource import shared_resource
FAQs
Add external folders to the sls package and run commands
The npm package sls-py-extern-pkgs receives a total of 2 weekly downloads. As such, sls-py-extern-pkgs popularity was classified as not popular.
We found that sls-py-extern-pkgs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.