Skip to main content

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 files for Flask-BotoSQS 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Flask-BotoSQS 0.2.0
File Size Uploaded
Flask-BotoSQS-0.2.0.tar.gz 2.3 kB Details

Release files / Flask-BotoSQS-0.2.0.tar.gz

Download URL Flask-BotoSQS-0.2.0.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e4938bea0f39120f54ed7a6c26422a0120e773b3b7d63aa293394d42702508b3
BLAKE2b-256 checksum
How to use checksums
36a5b14c0c1cc3a28f40d820cf3b38fe8f820c15cfbdb5bcd2181266ecd836ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file

0.1.1

1 release file

0.1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page