2 (in your app modules) is the right thing to do. Not sure why it does not
work on GAE. What web2py version are you using? Can you try the latest?
Another option is put the libraries is web2py/site-packages which is added
on sys.path by default. Please keep us updated about your progress. This
has to work and is important.
Massimo
On Sunday, 18 January 2015 17:17:10 UTC-6, Phil wrote:
>
> Caveat: I am not knowledgeable about web development.
>
> Situation: Our company develops IoT software enabling IoT product
> developers to easily connect their sensors to a backend datastore through
> amqp. Recently, a key player left and I must complete a demonstration that
> allows configuration of data channels and renders charts through a
> connection between amqp subscribed channels and web2py websockets (I
> understand these). We have developed our web using web2py which runs on
> GAE. We are importing pika from a local installation into python which I
> am assuming requires us to install the amqplib directly into web2py for GAE.
>
> Problem: I have tried many different methods of integrating our web2py web
> with our software and amqp.
>
> 1. placing our software in gluon.contrib.chimeraiot and the amqp code
> under gluon.contrib.amqp. (complete change in imports never worked)
> 2. placing all modules in modules worked locally but not on GAE
> 3. placing all modules in gluon. Did not work for me
>
> I read the following from a great logstash handler that I thinks has the
> clue to what to do. Any help would be appreciated.
>
> ###Preface - Recommended dependency management procedure on GAE
>
> It is recommended that you follow a dependency management procedure in which
> you have a folder for third-party dependencies adjacent to your application
> code folder. By creating symbolic links from inside your application code
> folder to that adjacent folder you can better control the actual folder being
> bundled with your app when you upload it, making the entire dependency
> managmenet + python include procedure easier
> ###Dependencies
> amqplib 1.2.0 - bundled
>
>
> I actually have no idea how to do this other than setting up the two folders
> amqp and ours at the same level in the folder hierarchy.
>
>
> Below is our current imports of pika.
>
>
> #!/usr/bin/env python
> """
> Defines an instance of the chimera message service, a layer of software that
> uses AMQP to reliably deliver messages in store and forward mode but provides
> a simple interface.
>
> This program needs the following libraries installed to run:
>
> pip install pika
>
> """
>
> import pika
> import chimera_log
> import logging
> import threading
> import zlib
> import os
> import tempfile
> import psutil
> import time
> from chimera_serializable_queue import SerializableQueue
>
> logging.basicConfig()
> logger=chimera_log.setup_custom_logger('chimera_message_service',
> 'chimera_message_service.log', logging.DEBUG)
>
> # AMQP constants
> DEFAULT_PRIORITY=0
> PERSISTENT_DELIVER_MODE=2
> DEFAULT_AMQP_PORT=5672
> SSL_AMQP_PORT=5671
> DEFAULT_SOCKET_TIMEOUT_S=1
>
> class ChimeraMessageService():
>
>
>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.