I don't have code for this, but the general idea would be:
* Refer to the SNS API from here: http://docs.aws.amazon.com/sns/latest/api/Welcome.html. I would use the `requests` library to interact with the API. Or you could search for a python client for this API. * Scheduler implementation, along with the callbacks code, is listed in the web2py book, and this forum.

Do you attempt the implementation, and share any issues you face.

________________________________________
Kiran Subbaraman
http://subbaraman.wordpress.com/about/

On Tue, 16-08-2016 5:12 PM, madhu nomula wrote:
Thank you.

I am completely new to this area. Could you please share sample code
with configure steps for SNS and integration in to Web2py tool.
Yes, the changed/newly inserted/deleted data has to be pushed.

Regards,
MC.

On Wed, Aug 3, 2016 at 10:44 AM, Kiran Subbaraman
<subbaraman.ki...@gmail.com> wrote:
Am assuming you are aware of the Amazon SNS APIs, and what it takes to
publish messages there (as a producer / publisher)
Do you want to read data from your database, and publish them to SNS on a:
* Regular scheduled basis?
* Whenever new data comes into the database?

In either case, I would use two web2py capabilities to do this - the
`_on_insert/update/delete` callbacks[1] in conjunction with the web2py
scheduler to publish to SNS.
The callback will help keep track of changes to the database (basically
whenever the database data changes, these callbacks are called ... and you
could record the changed value some place else ... maybe another table, or
store). The scheduler would call the function that would read from this
table/store and send this out to SNS.

Adjust the timing of the scheduler, depending on when you want to send out
the messages.

[1]
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=insert#callbacks-on-record-insert--delete-and-update



On Tuesday, August 2, 2016 at 11:21:39 PM UTC+5:30, madhu nomula wrote:
Hi All,

We have implemented a tool in web2py tool.

Now we have to implement sending the stored data(tables information) to
Amazon SNS.

Can you please help me how to move the stored data to Amazon SNS.

Thank you and appreciate your help in advance.


Regards,
MC
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to