Giter VIP home page Giter VIP logo

zappa_client's Introduction

Zappa client

This is a tool to call Zappa functions without APIGateway.

Installation

pip install zappa-client

Basic Usage

from zappa_client import ZappaClient
client = ZappaClient()
client.invoke(function_name=<your-lambda-function-name>,path=<app-route-path>)

Send data

from zappa_client import ZappaClient
client = ZappaClient()
client.invoke(function_name=<your-lambda-function-name>, path=<app-route-path>, data={"some":"data"}, http_method="POST")

Except json\dict response

from zappa_client import ZappaClient
client = ZappaClient()
client.invoke(function_name=<your-lambda-function-name>, path=<app-route-path>, json_response=True)

Zappa connection

Function name

In the zappa_settings.json file you have the project_name and the keys of the file are the "stages", which defines your functions to be <project_name>-<stage> Assuming you deployed the stage "dev" on project_name "test", your function name will be automatically test-dev. You should use test-dev as your function_name param in the ZappaClient invoke function.

Path

The path is the route of your Zappa app handler. For example, if you use flask, you will use the wrapper @app.route('/test', methods=['GET']) to point to a function on zappa. This is the path we are using. In this case the path will be test or /test.

zappa_client's People

Contributors

xdssio avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.