Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Python Lambda Logistics

The Python Lambda Logistics (pll) library is designed to assist with an automated deployment for Python 3 AWS Lambda functions.

As you will no doubt discover, as soon as you require more than the basic libraries, you need to start creating what are known as ‘deployment packages’ (zip files with all dependencies) for pushing even basic scripts up to AWS.

These packages require that the libraries are compiled for amazon’s version of linux (which is executing the code on your behalf).

Not helpful if, like me, your development machine isn’t running AWS Linux…

Some of the main libraries this has helped me so far with packaging:

  • SQLAlchemy

  • Pandas

  • NumPy

Underlying Process

pll aims to simplify the above by automating the build of your requirements.txt file in a Docker image of awslinux.

  1. Create working directories in your current project

    • Build – contains compiled site-packages for future re-use

    • Dist – outputted lambda zip for upload to AWS

  2. Check for a local docker image of saracen9/python-lambda or pull down

  3. Mount the following locations into the docker image

    • Build –> /tmp/app/psite-packages

    • Dist –> /tmp/app/zipped-package

    • YourAppplicationRoot –> /app

  4. Run the container and compile

  5. Shutdown and £profit

  6. (Opt) push code to AWS (Coming soon)

The original Dockerfile used to create the image is contained within the package source code for those who want to hack their own.

Usage

To manually run and configure the docker container use the below command.

docker run --rm --name py-lamb-compiler \
    -v ~/my/app:/app \
    -v ~/my/app/dist:/tmp/app/dist \
    -v ~/my/app/build:/tmp/app/build \
    saracen9/python-lambda

Alternatively install the library and put a pll.yaml in the root of your application.

packaging:
  app_root: '/my/app'
  build_path: '/my/app/build'
  dist_path: '/my/app/dist'

You can then run python -m pll and package the application from any script. As an additional option pass in the --config switch to define your own config file.

In addition, relative paths to the cwd are accepted. These are then converted to absolute paths at runtime E.g.

packaging:
  app_root: ''  # current directory
  build_path: 'build/'  # current directory/build
  dist_path: 'dist/'  # current directory/dist

Metadata

Release files for Python-Lambda-Logistics 0.0.2b0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Python-Lambda-Logistics 0.0.2b0
File Size Uploaded Provenance Actions
Python Lambda Logistics-0.0.2b0.tar.gz 4.1 kB Without provenance Details for Python Lambda Logistics-0.0.2b0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Python-Lambda-Logistics 0.0.2b0
File Interpreter ABI Platform Actions
Python_Lambda_Logistics-0.0.2b0-py3-none-any.whl Python 3 none any Details for Python_Lambda_Logistics-0.0.2b0-py3-none-any.whl

Total release size: 8.3 kB

Release files / Python Lambda Logistics-0.0.2b0.tar.gz

Download URL Python Lambda Logistics-0.0.2b0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c016756f1b61cc3368a31e3b4748cac62d37181c7b029bd3d5a2ec7ddf6bf05b
BLAKE2b-256 checksum
How to use checksums
99f4852c30ea614e436fe870f4834f76c03516600c89e447d56fb9942c1b59a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Python_Lambda_Logistics-0.0.2b0-py3-none-any.whl

Download URL Python_Lambda_Logistics-0.0.2b0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7edcac83c8424abc29999585de51b479d0c9f815305387fcb0dfc5bc7abadd4
BLAKE2b-256 checksum
How to use checksums
764401d00fddd3440458adf428c7dea9e0aa60b43ec106a39fb029439b423087
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Python-Lambda-Logistics 0.0.2b0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page