A simple packaging utility that creates an AWS Lambda zip for distribution
Project description
Install Notes
To install using pip:
pip install lamzip
To update using pip:
pip install lamzip --upgrade
Using LamZip
Initial Project Setup
Create a defaults file in your project directory to simplify packaging:
lamzip make-config [--config-name .altname]
Just using lamzip make-config without any arguments will create the default
config file .lamzip.yaml. Contained in the default config is an example
setup that looks like the following:
# Lambda-Zip (lamzip)
#
# Defaults for packaging your AWS Lambda function
#
source-directory: ./appsrc
destination-directory: ./dist
package-prefix: foo
package-version: 0.0.1
Configure LamZip
Your project structure should look something like the following:
Main-Project-Folder\
dist\
appsrc\
lib1\
lib2\
app.py
.bumpversion
.lamzip.yaml
.gitignore
LICENSE
README
requirements.txt
setup.py
In this example you would use the following settings:
source-directory to ./appsrc
destination-directory to ./dist # the default is typically the case here
package-prefix to app # zip file package name pre-pended to the version
package-version to 0.0.1 # current app version
Run LamZip (Package your function)
Once configured, you can just run LamZip in the following way:
# lamzip use-config
LamZip using existing config file: .lamzip.yaml
Source Dir: ./appsrc
Destination Dir: ./dist
Package Prefix: app
Package Version: 0.0.1
Creating Archive: ./dist\app-0.0.1.zip
adding: ./appsrc\app.py
Pass all parameters using CLI
It is not required to use the LamZip config file. All arguments can be passed using the CLI in the following way:
lamzip specify --src-dir ./appsrc --dest-dir ./dist --zip-prefix app --zip-version 0.0.1
Integration
Now that you have the LamZip config deployed to your project folder it is
recommended to use a versioning utility like "Bumpversion" to easily maintain the version
configuration within the LamZip config file (.lamzip.yaml).
https://github.com/peritus/bumpversion
Important
Ensure the python "Scripts" directory is located in your system path, as this library installs LamZip to that location for global use.
Verify the path:
Use the version response to verify the interpreter location on your system.
# pip3 -V
pip 20.0.2 from c:\program files\python37\lib\site-packages\pip (python 3.7)
Using BASH: "echo $PATH" to verify "<path-to-python-base>/scripts" exists
Using PowerShell: "$ENV:$PATH" to verify "<path-to-python-base>\Scripts" exists
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lamzip-0.4.1.tar.gz.
File metadata
- Download URL: lamzip-0.4.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0a826162dcc1b7f9810d892fc7785123d4b0c02deeb33c2c229729bc9302b27
|
|
| MD5 |
1aa739b779273eba821d11f197075235
|
|
| BLAKE2b-256 |
852b537628536d170cfa283685b1bb92428ccb8cd20a379576ecdabc2de3b0b5
|
File details
Details for the file lamzip-0.4.1-py3-none-any.whl.
File metadata
- Download URL: lamzip-0.4.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06ce91462078b518ef2a24642e4e3ef504567a9607d96528a49915cc7918a483
|
|
| MD5 |
34121c19129f1e10865758a948cb93eb
|
|
| BLAKE2b-256 |
38e3c581f15c55bbfad41c9d5f652a8b37110d484572cafd28ae53f3637e3dd9
|