Bluemixの上のPythonからsendgridでメールを送りたいのですが
#!/usr/bin/env python
#! coding: UTF-8
import urllib2
import base64
import zlib
import json
import sys
import ssl
import datetime
import sendgrid
import sqlalchemy
from sqlalchemy import *
import ibm_db_sa.ibm_db_sa
db2 = sqlalchemy.create_engine('ibm_db_sa://dash013754:password@bluemix05.bluforcloud.com:50000/BLUDB')
metadata = MetaData()
users = Table('users', metadata,
Column('user_id', Integer, primary_key = True),
Column('user_name', String(16), nullable = False),
Column('email_address', String(60), key='email'),
Column('password', String(20), nullable = False)
)
metadata.bind = db2
metadata.create_all()
users_table = Table('users', metadata, autoload=True, autoload_with=db2)
users_table
# using SendGrid's Python Library - https://github.com/sendgrid/sendgrid-python
sg = sendgrid.SendGridClient(api_user, api_key)
message = sendgrid.Mail()
message.add_to("ntadashi@jp.ibm.com")
message.set_from("ntadashi@sendgrid.com")
message.set_subject("Sending with SendGrid is Fun")
message.set_html(stmt)
sg.send(message)
をデプロイしようとすると、
Traceback (most recent call last):
File "server.py", line 10, in
import sendgrid
ImportError: No module named sendgrid
で落ちてしまいます。どうすれば、sendgridをBluemixにインストールできますか?教えてください