lambda-pyskel
Create python AWS Lambda skeleton from templates.
Shameless inspiration from @sgillies https://github.com/mapbox/pyskel
Install
You can install lambda-pyskel using pip
$ pip install -U pip
$ pip install lambda-pyskel
or install from source:
$ git clone https://github.com/vincentsarago/lambda-pyskel.git
$ cd lambda-pyskel
$ pip install -U pip
$ pip install -e .
Templates
Three different templates are available:
- simple: simple python lambda function
- rasterio: include rasterio wheels
- gdal: include custom gdal (2.4.1) installation from remotepixel docker image
Each templates has the following structure::
pyskel/ : main module
__init__.py
handler.py : handler function
tests/ : python tests
test_handler.py
test_mod.py
Dockerfile : Dockerfile to create the package.zip
LICENSE : BSD-2 license file
Makefile : make commands to create/tests the packages
README.md : Readme
setup.py : Python setup
tox.ini : tox template
Deployement Toolkit
In addition to python module templates, lambda-pyskel can also add configuration files for serverless or kes toolkit.
serverless: https://serverless.com
Usage
$ lps --help
Usage: lps [OPTIONS] NAME
Create new python AWS Lambda skeleton.
Options:
--version Show the version and exit.
--template [simple|rasterio|gdal] Use specific template (default: 'simple')
--serverless-toolkit [kes|serverless] Add deployement toolkit
--help Show this message and exit.
Create a python lambda function with rasterio
$ lps yo --template rasterio
$ ls -1 yo
Dockerfile
LICENSE
Makefile
README.rst
setup.py
tests/
tox.ini
yo/
# edit yo/handler.py and setup.py
$ make build
Contribution & Devellopement
Issues and pull requests are more than welcome.
Dev install & Pull-Request
$ git clone https://github.com/vincentsarago/lambda-pyskel.git
$ cd lambda-pyskel
$ pip install -e .[dev]
Python3.6 only
This repo is set to use pre-commit to run flake8, pydocstring and black ("uncompromising Python code formatter") when committing new code.
$ pre-commit install
$ git add .
$ git commit -m'my change'
black....................................................................Passed
Flake8...................................................................Passed
Verifying PEP257 Compliance..............................................Passed
$ git push origin
Release files for lambda-pyskel 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lambda-pyskel-3.0.0.tar.gz | 8.5 kB | Details |
Release files / lambda-pyskel-3.0.0.tar.gz
| Download URL | lambda-pyskel-3.0.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c230ad30215e7377dead5befbb2042678daeac70b5cfbced7240f3c84e190db
|
|
BLAKE2b-256 checksum How to use checksums |
7b15bf80d56ca3e0ceedaa059daf4d4858fb69433ab1bcdebd70b362a0ab43d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2
|