GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Instance method as function name in command line · Issue #73 · HDE/python-lambda-local

Instance method as function name in command line #73

New issue
Copy link
New issue
Copy link
Open
#74
Open
Instance method as function name in command line#73
#74
Copy link

Description

@ksmoore17
ksmoore17
opened on Dec 22, 2020
Issue body actions

I have defined my lambda function handler as a method on a class. The py file that I want to use as the handler creates an instance of this class.

I want to be able to invoke that method like:
python-lambda-local -f instance.method handler.py event.json

handler.py
class LambdaClass:
    def lambda_method(self, event, context):
        ... do stuff

instance = LambdaClass()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.