librelist archives

« back to archive

Flask Extensions on GAE - Flask XML-RPC

Flask Extensions on GAE - Flask XML-RPC

From:
Steven Race
Date:
2011-04-27 @ 19:37
  As previously discussed, Flask and some extensions have been proven to
work on 'Google App Engine' (GAE).  But are there any explicit limitations
when using extensions (or Flask itself) on GAE?  Specifically Flask XML-RPC.

Adding the following lines to main.py or views.py:
from flask import Module
from flaskext.xmlrpc import XMLRPCHandler, Fault

Results in:
from flaskext.xmlrpc import XMLRPCHandler, Fault

ImportError: cannot import name XMLRPCHandler


Flask XML-RPC:
source: https://bitbucket.org/leafstorm/flask-xml-rpc/
docs: http://pypi.python.org/pypi/Flask-XML-RPC/0.1.1
GAE specific Flask frameworks I've tried:
https://github.com/kamalgill/flask-appengine-template


all the best,
- steven

Re: [flask] Flask Extensions on GAE - Flask XML-RPC

From:
Zach Williams
Date:
2011-04-27 @ 19:48
Did you place the `xmlrpc.py` file in the `packages/flaskext` directory?

Also, is your project up on Bitbucket or Github so I can look over the
source?

Zach


On Wed, Apr 27, 2011 at 2:37 PM, Steven Race <stevenrace@gmail.com> wrote:

>   As previously discussed, Flask and some extensions have been proven to
> work on 'Google App Engine' (GAE).  But are there any explicit limitations
> when using extensions (or Flask itself) on GAE?  Specifically Flask XML-RPC.
>
> Adding the following lines to main.py or views.py:
> from flask import Module
> from flaskext.xmlrpc import XMLRPCHandler, Fault
>
> Results in:
> from flaskext.xmlrpc import XMLRPCHandler, Fault
>
> ImportError: cannot import name XMLRPCHandler
>
>
> Flask XML-RPC:
> source: https://bitbucket.org/leafstorm/flask-xml-rpc/
> docs: http://pypi.python.org/pypi/Flask-XML-RPC/0.1.1
> GAE specific Flask frameworks I've tried:
> https://github.com/kamalgill/flask-appengine-template
>
>
> all the best,
> - steven
>

Re: [flask] Flask Extensions on GAE - Flask XML-RPC

From:
Steven Race
Date:
2011-04-27 @ 20:14
Zach,

Presently I'm using the base FlaskGAE skeleton linked in the first post [0].
 Adding only the Flask XML-RPC example code into main.py to avoid confusion.

My xmlrpc.py and it's corresponding __init__.py are placed in:
/src/packages/flaskext/xmlrpc


[0]: https://github.com/kamalgill/flask-appengine-template


On Wed, Apr 27, 2011 at 2:48 PM, Zach Williams <hey@zachwill.com> wrote:

> Did you place the `xmlrpc.py` file in the `packages/flaskext` directory?
>
> Also, is your project up on Bitbucket or Github so I can look over the
> source?
>
> Zach
>
>
> On Wed, Apr 27, 2011 at 2:37 PM, Steven Race <stevenrace@gmail.com> wrote:
>
>>   As previously discussed, Flask and some extensions have been proven to
>> work on 'Google App Engine' (GAE).  But are there any explicit limitations
>> when using extensions (or Flask itself) on GAE?  Specifically Flask XML-RPC.
>>
>> Adding the following lines to main.py or views.py:
>> from flask import Module
>> from flaskext.xmlrpc import XMLRPCHandler, Fault
>>
>> Results in:
>> from flaskext.xmlrpc import XMLRPCHandler, Fault
>>
>> ImportError: cannot import name XMLRPCHandler
>>
>>
>> Flask XML-RPC:
>> source: https://bitbucket.org/leafstorm/flask-xml-rpc/
>> docs: http://pypi.python.org/pypi/Flask-XML-RPC/0.1.1
>> GAE specific Flask frameworks I've tried:
>> https://github.com/kamalgill/flask-appengine-template
>>
>>
>> all the best,
>> - steven
>>
>
>

Re: [flask] Flask Extensions on GAE - Flask XML-RPC

From:
Kamal Gill
Date:
2011-04-27 @ 20:27
Hi Steven,

As Zach mentioned, try placing the xmlrpc.py module in the 
packages/flaskext folder per se.

Try this layout...

flaskext/
  |-- wtf/
  |-- __init__.py (provided by flask-appengine-template)
  `-- xmlrpc.py

It sounds as if you've created an 'xmlrpc' package and placed that in the 
extensions folder, which may work, although you probably need to modify 
your import statement to the following...

from flaskext.xmlrpc.xmlrpc import XMLRPCHandler, Fault

...note the properly qualified package name.

HTH,
Kamal

On Apr 27, 2011, at 1:14 PM, Steven Race wrote:

> Zach,
> 
> Presently I'm using the base FlaskGAE skeleton linked in the first post 
[0].  Adding only the Flask XML-RPC example code into main.py to avoid 
confusion.
> 
> My xmlrpc.py and it's corresponding __init__.py are placed in: 
> /src/packages/flaskext/xmlrpc
> 
> 
> [0]: https://github.com/kamalgill/flask-appengine-template
> 
> 
> On Wed, Apr 27, 2011 at 2:48 PM, Zach Williams <hey@zachwill.com> wrote:
> Did you place the `xmlrpc.py` file in the `packages/flaskext` directory?
> 
> Also, is your project up on Bitbucket or Github so I can look over the source?
> 
> Zach
> 
> 
> On Wed, Apr 27, 2011 at 2:37 PM, Steven Race <stevenrace@gmail.com> wrote:
>   As previously discussed, Flask and some extensions have been proven to
work on 'Google App Engine' (GAE).  But are there any explicit limitations
when using extensions (or Flask itself) on GAE?  Specifically Flask 
XML-RPC.
> 
> Adding the following lines to main.py or views.py:
> from flask import Module
> from flaskext.xmlrpc import XMLRPCHandler, Fault
> 
> Results in:
> from flaskext.xmlrpc import XMLRPCHandler, Fault
> ImportError: cannot import name XMLRPCHandler
> 
> Flask XML-RPC:
> source: https://bitbucket.org/leafstorm/flask-xml-rpc/
> docs: http://pypi.python.org/pypi/Flask-XML-RPC/0.1.1
> GAE specific Flask frameworks I've tried:
> https://github.com/kamalgill/flask-appengine-template
> 
> 
> all the best,
> - steven
> 
> 

Re: [flask] Flask Extensions on GAE - Flask XML-RPC

From:
Steven Race
Date:
2011-04-27 @ 20:40
Ah! That did it!

I feel a bit dense for overlooking that in the first place.  Thanks to you
both for your contributions in building Flask skeletons for GAE.  I owe you
beers.

all the best,
steven

On Wed, Apr 27, 2011 at 3:27 PM, Kamal Gill <designbykamal@gmail.com> wrote:

> Hi Steven,
>
> As Zach mentioned, try placing the xmlrpc.py module in the
> packages/flaskext folder per se.
>
> Try this layout...
>
> flaskext/
>  |-- wtf/
>  |-- __init__.py (provided by flask-appengine-template)
>  `-- xmlrpc.py
>
> It sounds as if you've created an 'xmlrpc' package and placed that in the
> extensions folder, which may work, although you probably need to modify your
> import statement to the following...
>
> from flaskext.xmlrpc.xmlrpc import XMLRPCHandler, Fault
>
> ...note the properly qualified package name.
>
> HTH,
> Kamal
>
> On Apr 27, 2011, at 1:14 PM, Steven Race wrote:
>
> > Zach,
> >
> > Presently I'm using the base FlaskGAE skeleton linked in the first post
> [0].  Adding only the Flask XML-RPC example code into main.py to avoid
> confusion.
> >
> > My xmlrpc.py and it's corresponding __init__.py are placed in:
> > /src/packages/flaskext/xmlrpc
> >
> >
> > [0]: https://github.com/kamalgill/flask-appengine-template
> >
> >
> > On Wed, Apr 27, 2011 at 2:48 PM, Zach Williams <hey@zachwill.com> wrote:
> > Did you place the `xmlrpc.py` file in the `packages/flaskext` directory?
> >
> > Also, is your project up on Bitbucket or Github so I can look over the
> source?
> >
> > Zach
> >
> >
> > On Wed, Apr 27, 2011 at 2:37 PM, Steven Race <stevenrace@gmail.com>
> wrote:
> >   As previously discussed, Flask and some extensions have been proven to
> work on 'Google App Engine' (GAE).  But are there any explicit limitations
> when using extensions (or Flask itself) on GAE?  Specifically Flask XML-RPC.
> >
> > Adding the following lines to main.py or views.py:
> > from flask import Module
> > from flaskext.xmlrpc import XMLRPCHandler, Fault
> >
> > Results in:
> > from flaskext.xmlrpc import XMLRPCHandler, Fault
> > ImportError: cannot import name XMLRPCHandler
> >
> > Flask XML-RPC:
> > source: https://bitbucket.org/leafstorm/flask-xml-rpc/
> > docs: http://pypi.python.org/pypi/Flask-XML-RPC/0.1.1
> > GAE specific Flask frameworks I've tried:
> > https://github.com/kamalgill/flask-appengine-template
> >
> >
> > all the best,
> > - steven
> >
> >
>
>