Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Boto3 SQS integration for Flask

Project Description

Initialize

from flask_boto_sqs import FlaskBotoSQS

flask_boto_sqs = FlaskBotoSQS(app)

or:

flask_boto_sqs = FlaskBotoSQS()
flask_boto_sqs.init_app(app)

Configuration

Put kwargs for FlaskBotoSQS to ‘FLASK_BOTO_SQS’ in your Flask configuration.

app.config['FLASK_BOTO_SQS'] = {
    'region': 'ap-northeast-1',
    'aws_access_key_id': 'YOUR_AWS_ACCESS_KEY_ID',
    'aws_secret_access_key': 'YOUR_AWS_SECRET_ACCESS_KEY'
}

Usage

# https://boto3.readthedocs.org/en/latest/guide/sqs.html

q = flask_boto_sqs.sqs.get_queue_by_name(QueueName='your-queue-name')

# write
resp = q.send_message('What a lovely day!')
print resp.get('MessageId')

# read
for m in q.receive_messages():
    print m.body
    m.delete()
Release History

Release History

This version
History Node

0.2.0

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Flask-BotoSQS-0.2.0.tar.gz (2.3 kB) Copy SHA256 Checksum SHA256 Source Oct 8, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting