Skip to main content

Tool to streamline the build of python lambda functions.

Project description

circle pypi version apache license

Juniper is a packaging tool with a with a single purpose in mind: stream and standardize the creation of a zip artifact for a set of AWS Lambda functions.

Packaging of python lambda functions is a problem a web developer faces when building web APIs using AWS services. The main issue is that the dependencies of the function must be included along with the business logic of the function.

This tool does not deploy or update a lambda function in AWS. This tool is used to generate a set of .zip files contaning dependencies and shared libraries, which you can use to deploy a lambda function.

Quickstart

With Python==3.6 and Docker installed, install juniper:

> pip install juniper

Go to the code you are packaging and define a configuration for your functions, ex in manifest.yml:

functions:
router:                                         # Name of the lambda function (result in router.zip artifact)
    requirements: ./src/router/requirements.txt.  # Path to reqs file
    include:
    - ./src/commonlib/mylib                     # Path for inclusion in code
    - ./src/router_function/router.             # Path for inclusion in code

Build it!

> juni build

Your .zip is now in the dist/ directory. 🎉

Features

This list defines the entire scope of Juniper. Nothing more, nothing else.

  • Minimal manifest file to define packaging

  • Using docker containers as a way to install dependencies and generate the artifacts

  • Ability to tailor the requirements.txt per lambda

  • Create an individual zip artifact for multiple lambda functions

  • Ability to include shared dependencies (python modules relative to the function being packaged)

Contributing

For guidance on setting up a development environment and how to make a contribution to Juniper, see the contributing guidelines.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

juniper-0.2.4.tar.gz (15.7 kB view hashes)

Uploaded Source

Built Distribution

juniper-0.2.4-py3-none-any.whl (19.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page