Skip to main content

Send and receive messages without thinking about it

Project description

Send messages without really thinking about it. Currently works with Amazon’s SQS.


You configure your connection using a dsn in the form:


So, to connect to SQS, you would do:


You can also override some default values like region and read_lock:


If you set the environment variable MORP_DSN with your connection dsn then morp will automatically configure itself on first import.

1 Minute Getting Started

Send and receive a Foo message.

First, let’s set our environment variable:

export MORP_DSN=morp.interface.sqs.SQS://AWS_ID:AWS_KEY@

Second, let’s create a Foo class:

import morp

class Foo(morp.Message):

Third, let’s get Foo ready to receive messages:

while True:
    with Foo.recv() as foo_msg:
        print foo_msg.fields

Fourth, let’s send a message:

f = Foo()
f.some_field = 1
f.some_other_field = 2

And we’re done, you can check out the actual example in the /example folder on Github to see similar code to the above in action.


Use pip:

pip install morp



Project details

Download files

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

Source Distribution

morp-0.2.tar.gz (7.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page