npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nxicy/python-lambda

v0.3.1

Published

[![npm](https://img.shields.io/npm/v/@nxicy%2Fpython-lambda.svg?style=flat)](hhttps://www.npmjs.com/package/@nxicy/node-lambda) [![nx support](https://img.shields.io/badge/NX->=16.6.0-143055?)](https://nx.dev)

Downloads

1

Readme

@nxicy/python-lambda

npm nx support

The Python-Lambda Plugin contains generators and executors to simplify the creation and management of applications, handlers and libraries specifically designed for AWS Lambda deployment

Overview

Setting up Python-Lambda

To add the Python-Lambda plugin to an existing workspace, run the following:

npm i @nxicy/python-lambda --save-dev

Creating Applications

You can add a new application with the following:

nx g @nxicy/python-lambda:application my-python-lambda-app

Create Handlers

You can add a new handler to application with the following:

nx g @nxicy/python-lambda:handler --project my-python-lambda-app --name my-python-lambda-handler

Creating Libraries

To create a library run the following command:

nx g @nxicy/python-lambda:library my-python-library

Using Python-Lambda

Packaging Handler

Package the handler and any packages into a zip for deployment using:

nx run my-python-lambda-app:package-my-python-lambda

Package Library

Add Packages to a Package Library

You can use pip to install a package and target your package library folder, for example:

pip install --target=<workspace>/<library folder>/my-python-library  package_name
Adding a Package Library as a Dependency of a Handler

If you add the package library to the handler package target in project.json of the application it will be bundled with the main handler, i.e.:

 "package-my-python-lambda-handler": {
      "executor": "@nxicy/python-lambda:package",
      "options": {
         ...
        "packages": ["libs/python/my-python-library"],
        ...
      },
      
    }

Executors

package Packages a handler with options that can be configured in project.json

Generators

application Create a Python-Lambda application

handler Create a Python-Lambda handler

library Create a Python-Lambda Library

@nxicy/python-lambda:package

Packages a handler with options that can be configured in project.json

Options

handlerPath required string The path of the handler files.

outputPath required string The output path of the packaged handler

packages Array<string> Default: [] A list of package folders to include in the packaged handler.

zipFileOutputPath string The output path of the packaged handler.

@nxicy/python-lambda:application

Usage

nx g @nxicy/python-lambda:application ...

or

nx g @nxicy/python-lambda:app ...

Options

name required string The name of the application

tags string Add tags to the application.

@nxicy/python-lambda:handler

Usage

nx g @nxicy/python-lambda:handler ...

or

nx g @nxicy/python-lambda:hdlr ...

Options

name required string The name of the handler

project required string Then project name the handler will be added to

@nxicy/python-lambda:library

Create a python folder in the libs folder which contains a basic python module

Usage

nx g @nxicy/python-lambda:library ...

or

nx g @nxicy/python-lambda:lib ...

Options

name required string The name of the library