Code Monkey home page Code Monkey logo

sendgrid-demo's Introduction

SendGrid-demo

SendGrid Logo Travis Badge MIT licensed

This project allows you to deploy a SendGrid email service

Table of Contents

Prerequisites & Dependencies

Installation

Update the email addresses in app.py.

bx plugin install Cloud-Functions -r Bluemix
bx login -a api.ng.bluemix.net -o <YOUR IBM CLOUD USERNAME> -s dev
docker run --rm -v "$PWD:/tmp" ibmfunctions/action-python-v3 \
   bash  -c "cd tmp && virtualenv virtualenv && source virtualenv/bin/activate && pip install -r requirements.txt"
zip -r helloSendGrid.zip virtualenv __main__.py app.py
bx wsk action create helloSendGrid --kind python-jessie:3 helloSendGrid.zip

The following is the procedure for updating your IBM Cloud Function after making a code change:

zip -r helloSendGrid.zip virtualenv __main__.py app.py
bx wsk action update helloSendGrid --kind python-jessie:3 helloSendGrid.zip

Quick Start

Go to the IBM Cloud Functions Actions page.

Click the "helloSendGrid" link.

Click the "Parameters" link.

"Add" a parameter with the "Parameter Name" SENDGRID_API_KEY and the "Parameter Value" is your SendGrid API Key.

bx wsk action invoke --result helloSendGrid

Usage

In addition the Quick Start, you can access your IBM Cloud Function using CURL.

cp .env_sample .env

Replace YOUR IBM CLOUD API KEY with your IBM Cloud API Key.

source .env

Go to the IBM Cloud Functions Actions page.

Click the "helloSendGrid" link.

Click the "Endpoints" link.

Copy the commands under "CURL" and replace API-KEY with $IBM_CLOUD_API_KEY.

Use Cases

Send an email using the command line.

Announcements

Come join me at IBM Index 2018 on 2/2/18.

Roadmap

Add the ability to pass in various paramaters such as to email, from email, subject and body.

Add Web Action and Gateway support.

Add tests.

Update documentation.

How to Contribute

I encourage contribution to this project, please see our CONTRIBUTING guide for details.

Troubleshooting

Please see the troubleshooting guide for common library issues.

About

sendgrid-ibm-index-open-source-workshop is supported by the SendGrid Developer Experience Team.

sendgrid-demo's People

Contributors

rutkat 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.