librelist archives

« back to archive

Flask examples

Flask examples

From:
kracekumar ramaraju
Date:
2011-06-25 @ 16:28
Hello
 I am newbie for flask and I look forward to create apps with flask,I would
like look around with more examples or projects to learn.Incase any books or
sites or slides or projects if you could suggest,it will be grateful.

-- 
winning regards
kracekumar
http://kracekumar.wordpress.com

Re: [flask] Flask examples

From:
Amirouche Boubekki
Date:
2011-06-25 @ 16:47
Héllo Kracekumar,

You will find some projects I've done with flask on bitbucket:

- https://bitbucket.org/abki/andalucia
 <https://bitbucket.org/abki/andalucia>  - flask-celery
  - flask-wtforms
  - flask-scripts

https://bitbucket.org/abki/nuagecms & https://bitbucket.org/abki/presence

<https://bitbucket.org/abki/presence>are both appengine apps that use
flask-wtforms

Fell free to contact me by mail if you have troubles getting them running.

Hope it helps,

Amirouche ~ abki_

2011/6/25 kracekumar ramaraju <kracethekingmaker@gmail.com>

> Hello
>  I am newbie for flask and I look forward to create apps with flask,I would
> like look around with more examples or projects to learn.Incase any books or
> sites or slides or projects if you could suggest,it will be grateful.
>
> --
> winning regards
> kracekumar
> http://kracekumar.wordpress.com
>

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-25 @ 18:41
Hello Amirouche Boubekki
 It is so kind of  you,I will look it them and will mail incase I am
stuck.Thank you .


Winning Regards
Kracekumar.R
http://kracekumar.wordpress.com

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-27 @ 20:05
Hello Amirouche Boubekk

 I downloaded the links and was trying to use andalucia$,I followed
README,requirements.txt and I am wondering how to start the app ?

I tried

*kracekumar@python-lover:~/codes/python/andalucia/andalucia$ python
__init__.py
Traceback (most recent call last):
  File "__init__.py", line 2, in <module>
    from flaskext.mongoalchemy import MongoAlchemy
ImportError: No module named mongoalchemy

kracekumar@python-lover:~/codes/python/andalucia/andalucia$ python
actions.py
Traceback (most recent call last):
  File "actions.py", line 8, in <module>
    from flaskext.actions import Manager
ImportError: No module named actions*

But I am bit confused seeing all .py files and wondering what it is trying
to deliver .

In settings.py
ROOT = '/home/amirouche/Bureau/projects/andalucia/'

In case you had used ROOT some where in app,it will definitely break my app
right ?

What I can say ,this could be worth learning :)



-- 
*Winning Regards
KraceKumar.R
http://kracekumar.wordpress.com
+91-97906-58304
*

Re: [flask] Flask examples

From:
Amirouche Boubekki
Date:
2011-06-27 @ 22:19
You are starting big :)

 I downloaded the links and was trying to use andalucia$,I followed
> README,requirements.txt and I am wondering how to start the app ?
>

I updated README <https://bitbucket.org/abki/andalucia> file check it out. I
had some trouble getting up and running tproxy so follow the readme
carrefuly :)


> I tried
>
> *kracekumar@python-lover:~/codes/python/andalucia/andalucia$ python
> __init__.py
> Traceback (most recent call last):
>   File "__init__.py", line 2, in <module>
>     from flaskext.mongoalchemy import MongoAlchemy
> ImportError: No module named mongoalchemy
> *


It looks like mongoalchemy is not installed. If the `pip -r
requirements.txt` fails, try to install it by "hand" with `pip install
mongoalchemy`

*kracekumar@python-lover:~/codes/python/andalucia/andalucia$ python
> actions.py
> Traceback (most recent call last):
>   File "actions.py", line 8, in <module>
>     from flaskext.actions import Manager
> ImportError: No module named actions*


they are several things to run please see the new README.rst for guidance

But I am bit confused seeing all .py files and wondering what it is trying
> to deliver.
>

a little microblogging application currently it has this feature:

- register / login / logout
- you can post small messages and see them
- you follow other users and see their messages
- it is not a feature but something I wanted to experiment with : it uses
celery to propagate messages to your followers (and vice versa).

It's far from complete.

Here is a little explanation of all the files (I removed some file from the
repo):

- __ini__.py : http://flask.pocoo.org/docs/patterns/packages/
- biz.py : it should be renamed core.py, there every core feature of the
application. This function can be used untouched with another interface
(command line, rest etc...). It used by celery & flask views.
- celeryconfig.py : is celery configuration file it should work as is if you
use default configuration of mongodb
- dao.py : dao stand for data access object. I wanted to know how hard it
would be to abstract data access completly since I use mongo, if I want to
switch to couchdb I should be able to change only this functions and add a
`save` (if they have'nt one already) to couchdb model classes to be able to
run the app.
- forms.py : WTForms, and some custom fields
- locks.py : locks used to be sure I don't run twice a celery action, see
[1]
- models.py : mongoalchemy models
- run_celery.sh : script that runs celery for dev. setup
- settings : I guess you know
- tasks.py : it's the file where are defined celery tasks (or actions) it's
used by core (no abstraction here :/)
- templates :)
- utils.py : it is what it is
- views.py : flask views (urls are defined here)
- web.py : stands for actions that are not part of core, nor anything else,
you can think of it as flask_utils.py (did I say it was an experiment ?)
I've this stuff cause login can be done differently in google appengine for
example so I have little to change to make it work on GAE...

In settings.py
> ROOT = '/home/amirouche/Bureau/projects/andalucia/'
>

You shouldn't have to change this now


What I can say ,this could be worth learning :)
>

If you don't know celery for sure. Really it's just a get together between
several flask extensions. If you are more confortable learning this way go
ahead but have a tab or two open with flask, flask-wtforms then wtforms,
flask-mongoalchemy then mongoalchemy, flask-celery then celery
documentations. It's may seem hard at first glance...

Hope it helps

Amirouche

[1]

http://docs.celeryproject.org/en/latest/cookbook/tasks.html#ensuring-a-task-is-only-executed-one-at-a-time

Re: [flask] Flask examples

From:
admin fefaya
Date:
2011-06-27 @ 23:28
Hi Amirouche,
Thanks for your kind explanation :)

On 06/28/2011 05:19 AM, Amirouche Boubekki wrote:
> You are starting big :)
>
>       I downloaded the links and was trying to use andalucia$,I followed
>     README,requirements.txt and I am wondering how to start the app ?
>
>
> I updated README <https://bitbucket.org/abki/andalucia> file check it
> out. I had some trouble getting up and running tproxy so follow the
> readme carrefuly :)
>
>     I tried
>
>     */kracekumar@python-lover:~/codes/python/andalucia/andalucia$ python
>     __init__.py
>     Traceback (most recent call last):
>        File "__init__.py", line 2, in <module>
>          from flaskext.mongoalchemy import MongoAlchemy
>     ImportError: No module named mongoalchemy
>     /*
>
>
> It looks like mongoalchemy is not installed. If the `pip -r
> requirements.txt` fails, try to install it by "hand" with `pip install
> mongoalchemy`
>
>     */kracekumar@python-lover:~/codes/python/andalucia/andalucia$ python
>     actions.py
>     Traceback (most recent call last):
>        File "actions.py", line 8, in <module>
>          from flaskext.actions import Manager
>     ImportError: No module named actions/*
>
>
> they are several things to run please see the new README.rst for guidance
>
>     But I am bit confused seeing all .py files and wondering what it is
>     trying to deliver.
>
>
> a little microblogging application currently it has this feature:
>
> - register / login / logout
> - you can post small messages and see them
> - you follow other users and see their messages
> - it is not a feature but something I wanted to experiment with : it
> uses celery to propagate messages to your followers (and vice versa).
>
> It's far from complete.
>
> Here is a little explanation of all the files (I removed some file from
> the repo):
>
> - __ini__.py : http://flask.pocoo.org/docs/patterns/packages/
> - biz.py : it should be renamed core.py, there every core feature of the
> application. This function can be used untouched with another interface
> (command line, rest etc...). It used by celery & flask views.
> - celeryconfig.py : is celery configuration file it should work as is if
> you use default configuration of mongodb
> - dao.py : dao stand for data access object. I wanted to know how hard
> it would be to abstract data access completly since I use mongo, if I
> want to switch to couchdb I should be able to change only this functions
> and add a `save` (if they have'nt one already) to couchdb model classes
> to be able to run the app.
> - forms.py : WTForms, and some custom fields
> - locks.py : locks used to be sure I don't run twice a celery action,
> see [1]
> - models.py : mongoalchemy models
> - run_celery.sh : script that runs celery for dev. setup
> - settings : I guess you know
> - tasks.py : it's the file where are defined celery tasks (or actions)
> it's used by core (no abstraction here :/)
> - templates :)
> - utils.py : it is what it is
> - views.py : flask views (urls are defined here)
> - web.py : stands for actions that are not part of core, nor anything
> else, you can think of it as flask_utils.py (did I say it was an
> experiment ?) I've this stuff cause login can be done differently in
> google appengine for example so I have little to change to make it work
> on GAE...
>
>     In settings.py
>     ROOT = '/home/amirouche/Bureau/projects/andalucia/'
>
>
> You shouldn't have to change this now
>
>
>     What I can say ,this could be worth learning :)
>
>
> If you don't know celery for sure. Really it's just a get together
> between several flask extensions. If you are more confortable learning
> this way go ahead but have a tab or two open with flask, flask-wtforms
> then wtforms, flask-mongoalchemy then mongoalchemy, flask-celery then
> celery documentations. It's may seem hard at first glance...
>
> Hope it helps
>
> Amirouche
>
> [1]
> 
http://docs.celeryproject.org/en/latest/cookbook/tasks.html#ensuring-a-task-is-only-executed-one-at-a-time

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 16:32
Hello
 I am breaking my head again :)
(env.andalucia)kracekumar@python-lover:~/codes/python/andalucia/andalucia$
sudo pip install Flask-Script
Requirement already satisfied (use --upgrade to upgrade): Flask-Script in
/usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): Flask in
/usr/local/lib/python2.7/dist-packages/Flask-0.6.1-py2.7.egg (from
Flask-Script)
Requirement already satisfied (use --upgrade to upgrade): argparse in
/usr/lib/pymodules/python2.7 (from Flask-Script)
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.6.1 in
/usr/lib/pymodules/python2.7 (from Flask->Flask-Script)
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in
/usr/lib/pymodules/python2.7 (from Flask->Flask-Script)
Cleaning up...
(env.andalucia)kracekumar@python-lover:~/codes/python/andalucia/andalucia$
python scripts.py runserver -p 8000
Traceback (most recent call last):
  File "scripts.py", line 5, in <module>
    from flaskext.script import Manager
ImportError: No module named flaskext.script

sudo pip install Flask-Script results requirements satisfied.but python
scripts.py runserver -p 8000 doesn't work. . .
Now I feel there should be bundler like Rails 3,though people say virtualenv
can solve that problem but I am facing it . . .

Re: [flask] Flask examples

From:
Ron DuPlain
Date:
2011-06-29 @ 16:39
On Wed, Jun 29, 2011 at 12:32 PM, kracekumar ramaraju
<kracethekingmaker@gmail.com> wrote:
>  I am breaking my head again :)
> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia/andalucia$
> sudo pip install Flask-Script
> Requirement already satisfied (use --upgrade to upgrade): Flask-Script in
> /usr/local/lib/python2.7/dist-packages
> Requirement already satisfied (use --upgrade to upgrade): Flask in
> /usr/local/lib/python2.7/dist-packages/Flask-0.6.1-py2.7.egg (from
> Flask-Script)
> Requirement already satisfied (use --upgrade to upgrade): argparse in
> /usr/lib/pymodules/python2.7 (from Flask-Script)
> Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.6.1 in
> /usr/lib/pymodules/python2.7 (from Flask->Flask-Script)
> Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in
> /usr/lib/pymodules/python2.7 (from Flask->Flask-Script)
> Cleaning up...
> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia/andalucia$
> python scripts.py runserver -p 8000
> Traceback (most recent call last):
>   File "scripts.py", line 5, in <module>
>     from flaskext.script import Manager
> ImportError: No module named flaskext.script

This might not be a problem with Flask-Script at all.

This is a bug in namespace packaging.  Each extension should be
installing into a non-zipped .egg with a flaskext folder inside.
Somewhere in your PYTHONPATH, you have a Flask extension which
installed to 'flaskext', not Flask-ExtensionName-0.1.egg/flaskext/.

Look around for standalone 'flaskext' folders, and uninstall the
extension which did not install into a .egg.  If had to guess, I'd say
it's Flask-Testing.

-Ron

Re: [flask] Flask examples

From:
Jesse
Date:
2011-06-29 @ 16:45
Also, if your virtualenv was created with --no-site-packages, running
pip as the superuser will install Flask-Script to the wrong location.
Try a standard `pip install flask-script` or use -E to specify your
virtualenv.

Jesse

On Wed, Jun 29, 2011 at 9:39 AM, Ron DuPlain <ron.duplain@gmail.com> wrote:
> On Wed, Jun 29, 2011 at 12:32 PM, kracekumar ramaraju
> <kracethekingmaker@gmail.com> wrote:
>>  I am breaking my head again :)
>> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia/andalucia$
>> sudo pip install Flask-Script
>> Requirement already satisfied (use --upgrade to upgrade): Flask-Script in
>> /usr/local/lib/python2.7/dist-packages
>> Requirement already satisfied (use --upgrade to upgrade): Flask in
>> /usr/local/lib/python2.7/dist-packages/Flask-0.6.1-py2.7.egg (from
>> Flask-Script)
>> Requirement already satisfied (use --upgrade to upgrade): argparse in
>> /usr/lib/pymodules/python2.7 (from Flask-Script)
>> Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.6.1 in
>> /usr/lib/pymodules/python2.7 (from Flask->Flask-Script)
>> Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in
>> /usr/lib/pymodules/python2.7 (from Flask->Flask-Script)
>> Cleaning up...
>> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia/andalucia$
>> python scripts.py runserver -p 8000
>> Traceback (most recent call last):
>>   File "scripts.py", line 5, in <module>
>>     from flaskext.script import Manager
>> ImportError: No module named flaskext.script
>
> This might not be a problem with Flask-Script at all.
>
> This is a bug in namespace packaging.  Each extension should be
> installing into a non-zipped .egg with a flaskext folder inside.
> Somewhere in your PYTHONPATH, you have a Flask extension which
> installed to 'flaskext', not Flask-ExtensionName-0.1.egg/flaskext/.
>
> Look around for standalone 'flaskext' folders, and uninstall the
> extension which did not install into a .egg.  If had to guess, I'd say
> it's Flask-Testing.
>
> -Ron
>

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 16:57
Thank you for everyone for such a generous and instantaneous support.Even
after setting virtual env and I ran the script as non sudo user,I have
issue. . .
kracekumar@python-lover:~/codes/python/andalucia$ pip  install -r
requirements.txt
Requirement already satisfied (use --upgrade to upgrade): Flask==0.6.1 in
/usr/local/lib/python2.7/dist-packages/Flask-0.6.1-py2.7.egg (from -r
requirements.txt (line 1))
Downloading/unpacking Flask-Actions==0.6.4 (from -r requirements.txt (line
2))
  Running setup.py egg_info for package Flask-Actions

    warning: no files found matching '*.js' under directory
'flaskext/actions/project_template/static'
    warning: no previously-included files matching '*.pyc' found under
directory 'tests'
    warning: no previously-included files matching '*.pyc' found under
directory 'tests'
    warning: no previously-included files matching '*.pyc' found under
directory 'docs'
    warning: no previously-included files matching '*.pyo' found under
directory 'docs'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Flask-Celery==2.2.5 (from -r requirements.txt (line
3))
  Running setup.py egg_info for package Flask-Celery

    WARNING: flaskext is a namespace package, but its __init__.py does
    not declare_namespace(); setuptools 0.7 will REQUIRE this!
    (See the setuptools manual under "Namespace Packages" for details.)

    no previously-included directories found matching 'tox.ini'
    no previously-included directories found matching 'flaskext/*.pyc'
    no previously-included directories found matching 'example/*.pyc'
    no previously-included directories found matching 'tests/*.pyc'
Downloading/unpacking Flask-MongoAlchemy==0.2a1 (from -r requirements.txt
(line 4))
  Running setup.py egg_info for package Flask-MongoAlchemy

Requirement already satisfied (use --upgrade to upgrade):
Flask-Script==0.3.1 in /usr/local/lib/python2.7/dist-packages (from -r
requirements.txt (line 5))
Downloading/unpacking Flask-Uploads==0.1.2 (from -r requirements.txt (line
6))
  Running setup.py egg_info for package Flask-Uploads

Requirement already satisfied (use --upgrade to upgrade): Flask-WTF==0.5.2
in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line
7))
Requirement already satisfied (use --upgrade to upgrade): Jinja2==2.5.5 in
/usr/lib/pymodules/python2.7 (from -r requirements.txt (line 8))
Downloading/unpacking MongoAlchemy==0.8 (from -r requirements.txt (line 9))
  Running setup.py egg_info for package MongoAlchemy

Requirement already satisfied (use --upgrade to upgrade): WTForms==0.6.3 in
/usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): Werkzeug==0.6.2 in
/usr/lib/pymodules/python2.7 (from -r requirements.txt (line 11))
Downloading/unpacking amqplib==0.6.1 (from -r requirements.txt (line 12))
  Running setup.py egg_info for package amqplib

Downloading/unpacking anyjson==0.3.1 (from -r requirements.txt (line 13))
  Running setup.py egg_info for package anyjson

Downloading/unpacking argparse==1.2.1 (from -r requirements.txt (line 14))
  Running setup.py egg_info for package argparse

    warning: no previously-included files matching '*.pyc' found anywhere in
distribution
    warning: no previously-included files matching '*.pyo' found anywhere in
distribution
    warning: no previously-included files matching '*.orig' found anywhere
in distribution
    warning: no previously-included files matching '*.rej' found anywhere in
distribution
    no previously-included directories found matching 'doc/_build'
    no previously-included directories found matching 'env24'
    no previously-included directories found matching 'env25'
    no previously-included directories found matching 'env26'
    no previously-included directories found matching 'env27'
Downloading/unpacking celery==2.2.6 (from -r requirements.txt (line 15))
  Running setup.py egg_info for package celery

    warning: no files found matching '*' under directory 'bin'
    no previously-included directories found matching 'tests/*.pyc'
    no previously-included directories found matching 'docs/*.pyc'
    no previously-included directories found matching 'contrib/*.pyc'
    no previously-included directories found matching 'celery/*.pyc'
    no previously-included directories found matching 'bin/*.pyc'
    no previously-included directories found matching 'docs/.build'
Downloading/unpacking celerymon==0.3.0 (from -r requirements.txt (line 16))
  Running setup.py egg_info for package celerymon

    warning: no files found matching '*.py' under directory 'celerymon'
    no previously-included directories found matching 'celerymon/*.pyc'
    no previously-included directories found matching 'bin/*.pyc'
Downloading/unpacking distribute==0.6.10 (from -r requirements.txt (line
17))
  Running setup.py egg_info for package distribute

Downloading/unpacking gevent==1.0dev (from -r requirements.txt (line 18))
  Could not find a version that satisfies the requirement gevent==1.0dev
(from -r requirements.txt (line 18)) (from versions: )
No distributions matching the version for gevent==1.0dev (from -r
requirements.txt (line 18))
Storing complete log in /home/kracekumar/.pip/pip.log
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 9, in <module>
    load_entry_point('pip==1.0.1', 'console_scripts', 'pip')()
  File
"/usr/local/lib/python2.7/dist-packages/pip-1.0.1-py2.7.egg/pip/__init__.py",
line 116, in main
    return command.main(initial_args, args[1:], options)
  File
"/usr/local/lib/python2.7/dist-packages/pip-1.0.1-py2.7.egg/pip/basecommand.py",
line 151, in main
    log_fp = open_logfile(log_fn, 'w')
  File
"/usr/local/lib/python2.7/dist-packages/pip-1.0.1-py2.7.egg/pip/basecommand.py",
line 180, in open_logfile
    log_fp = open(filename, mode)
IOError: [Errno 13] Permission denied: '/home/kracekumar/.pip/pip.log'
kracekumar@python-lover:~/codes/python/andalucia$ ls
andalucia      celeryconfig.py  proxy.py          reset.sh
andalucia.ini  env.andalucia    README            run.sh
build          paginator.py     requirements.txt  static
kracekumar@python-lover:~/codes/python/andalucia$ source
env.andalucia/bin/activate
(env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$ python
andalucia/scripts.py runserver -p 8000
Traceback (most recent call last):
  File "andalucia/scripts.py", line 5, in <module>
    from flaskext.script import Manager
ImportError: No module named flaskext.script
(env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$

Re: [flask] Flask examples

From:
Adam Patterson
Date:
2011-06-29 @ 18:00
are activated the virtualenv AFTER you did pip install.

when the virtualenv is active it sets the python path so pip installs to the
proper place. if you dont it uses the system python path

On Wed, Jun 29, 2011 at 11:57 AM, kracekumar ramaraju <
kracethekingmaker@gmail.com> wrote:

> Thank you for everyone for such a generous and instantaneous support.Even
> after setting virtual env and I ran the script as non sudo user,I have
> issue. . .
> kracekumar@python-lover:~/codes/python/andalucia$ pip  install -r
> requirements.txt
> Requirement already satisfied (use --upgrade to upgrade): Flask==0.6.1 in
> /usr/local/lib/python2.7/dist-packages/Flask-0.6.1-py2.7.egg (from -r
> requirements.txt (line 1))
> Downloading/unpacking Flask-Actions==0.6.4 (from -r requirements.txt (line
> 2))
>   Running setup.py egg_info for package Flask-Actions
>
>     warning: no files found matching '*.js' under directory
> 'flaskext/actions/project_template/static'
>     warning: no previously-included files matching '*.pyc' found under
> directory 'tests'
>     warning: no previously-included files matching '*.pyc' found under
> directory 'tests'
>     warning: no previously-included files matching '*.pyc' found under
> directory 'docs'
>     warning: no previously-included files matching '*.pyo' found under
> directory 'docs'
>     no previously-included directories found matching 'docs/_build'
>     no previously-included directories found matching 'docs/_themes/.git'
> Downloading/unpacking Flask-Celery==2.2.5 (from -r requirements.txt (line
> 3))
>   Running setup.py egg_info for package Flask-Celery
>
>     WARNING: flaskext is a namespace package, but its __init__.py does
>     not declare_namespace(); setuptools 0.7 will REQUIRE this!
>     (See the setuptools manual under "Namespace Packages" for details.)
>
>     no previously-included directories found matching 'tox.ini'
>     no previously-included directories found matching 'flaskext/*.pyc'
>     no previously-included directories found matching 'example/*.pyc'
>     no previously-included directories found matching 'tests/*.pyc'
> Downloading/unpacking Flask-MongoAlchemy==0.2a1 (from -r requirements.txt
> (line 4))
>   Running setup.py egg_info for package Flask-MongoAlchemy
>
> Requirement already satisfied (use --upgrade to upgrade):
> Flask-Script==0.3.1 in /usr/local/lib/python2.7/dist-packages (from -r
> requirements.txt (line 5))
> Downloading/unpacking Flask-Uploads==0.1.2 (from -r requirements.txt (line
> 6))
>   Running setup.py egg_info for package Flask-Uploads
>
> Requirement already satisfied (use --upgrade to upgrade): Flask-WTF==0.5.2
> in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line
> 7))
> Requirement already satisfied (use --upgrade to upgrade): Jinja2==2.5.5 in
> /usr/lib/pymodules/python2.7 (from -r requirements.txt (line 8))
> Downloading/unpacking MongoAlchemy==0.8 (from -r requirements.txt (line 9))
>   Running setup.py egg_info for package MongoAlchemy
>
> Requirement already satisfied (use --upgrade to upgrade): WTForms==0.6.3 in
> /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 10))
> Requirement already satisfied (use --upgrade to upgrade): Werkzeug==0.6.2
> in /usr/lib/pymodules/python2.7 (from -r requirements.txt (line 11))
> Downloading/unpacking amqplib==0.6.1 (from -r requirements.txt (line 12))
>   Running setup.py egg_info for package amqplib
>
> Downloading/unpacking anyjson==0.3.1 (from -r requirements.txt (line 13))
>   Running setup.py egg_info for package anyjson
>
> Downloading/unpacking argparse==1.2.1 (from -r requirements.txt (line 14))
>   Running setup.py egg_info for package argparse
>
>     warning: no previously-included files matching '*.pyc' found anywhere
> in distribution
>     warning: no previously-included files matching '*.pyo' found anywhere
> in distribution
>     warning: no previously-included files matching '*.orig' found anywhere
> in distribution
>     warning: no previously-included files matching '*.rej' found anywhere
> in distribution
>     no previously-included directories found matching 'doc/_build'
>     no previously-included directories found matching 'env24'
>     no previously-included directories found matching 'env25'
>     no previously-included directories found matching 'env26'
>     no previously-included directories found matching 'env27'
> Downloading/unpacking celery==2.2.6 (from -r requirements.txt (line 15))
>   Running setup.py egg_info for package celery
>
>     warning: no files found matching '*' under directory 'bin'
>     no previously-included directories found matching 'tests/*.pyc'
>     no previously-included directories found matching 'docs/*.pyc'
>     no previously-included directories found matching 'contrib/*.pyc'
>     no previously-included directories found matching 'celery/*.pyc'
>     no previously-included directories found matching 'bin/*.pyc'
>     no previously-included directories found matching 'docs/.build'
> Downloading/unpacking celerymon==0.3.0 (from -r requirements.txt (line 16))
>   Running setup.py egg_info for package celerymon
>
>     warning: no files found matching '*.py' under directory 'celerymon'
>     no previously-included directories found matching 'celerymon/*.pyc'
>     no previously-included directories found matching 'bin/*.pyc'
> Downloading/unpacking distribute==0.6.10 (from -r requirements.txt (line
> 17))
>   Running setup.py egg_info for package distribute
>
> Downloading/unpacking gevent==1.0dev (from -r requirements.txt (line 18))
>   Could not find a version that satisfies the requirement gevent==1.0dev
> (from -r requirements.txt (line 18)) (from versions: )
> No distributions matching the version for gevent==1.0dev (from -r
> requirements.txt (line 18))
> Storing complete log in /home/kracekumar/.pip/pip.log
>
> Traceback (most recent call last):
>   File "/usr/local/bin/pip", line 9, in <module>
>     load_entry_point('pip==1.0.1', 'console_scripts', 'pip')()
>   File
> "/usr/local/lib/python2.7/dist-packages/pip-1.0.1-py2.7.egg/pip/__init__.py",
> line 116, in main
>     return command.main(initial_args, args[1:], options)
>   File
> "/usr/local/lib/python2.7/dist-packages/pip-1.0.1-py2.7.egg/pip/basecommand.py",
> line 151, in main
>     log_fp = open_logfile(log_fn, 'w')
>   File
> "/usr/local/lib/python2.7/dist-packages/pip-1.0.1-py2.7.egg/pip/basecommand.py",
> line 180, in open_logfile
>     log_fp = open(filename, mode)
> IOError: [Errno 13] Permission denied: '/home/kracekumar/.pip/pip.log'
> kracekumar@python-lover:~/codes/python/andalucia$ ls
> andalucia      celeryconfig.py  proxy.py          reset.sh
> andalucia.ini  env.andalucia    README            run.sh
> build          paginator.py     requirements.txt  static
> kracekumar@python-lover:~/codes/python/andalucia$ source
> env.andalucia/bin/activate
> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$ python
> andalucia/scripts.py runserver -p 8000
>
> Traceback (most recent call last):
>   File "andalucia/scripts.py", line 5, in <module>
>
>     from flaskext.script import Manager
> ImportError: No module named flaskext.script
> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$
>
>

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 18:18
Now I did
kracekumar@python-lover:~/codes/python/andalucia$ source
env.andalucia/bin/activate
(env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$ pip install
-r requirements.txt
It went to install and then,I did
(env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$ python
andalucia/scripts.py runserver -p 8000
Traceback (most recent call last):
  File "andalucia/scripts.py", line 5, in <module>
    from flaskext.script import Manager
ImportError: No module named flaskext.script
(env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$

Re: [flask] Flask examples

From:
Adam Patterson
Date:
2011-06-29 @ 18:34
Just for testing please try the following.

# Open a new shell/terminal (or deactivate your current env.)
cd ~/codes/python/andalucia
virtualenv --no-site-packages env
source env/bin/activate
pip install -r requirements.txt
# run your server

If this fails post the output of the above commands (all of it), your
requirements.txt and your andalucia/scripts.py



On Wed, Jun 29, 2011 at 1:18 PM, kracekumar ramaraju <
kracethekingmaker@gmail.com> wrote:

> Now I did
> kracekumar@python-lover:~/codes/python/andalucia$ source
> env.andalucia/bin/activate
> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$ pip
> install -r requirements.txt
> It went to install and then,I did
> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$ python
> andalucia/scripts.py runserver -p 8000
> Traceback (most recent call last):
>   File "andalucia/scripts.py", line 5, in <module>
>     from flaskext.script import Manager
> ImportError: No module named flaskext.script
> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$
>
>
>

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 18:55
(env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$ virtualenv
--no-site-packages env
New python executable in env/bin/python
Installing setuptools............done.
Installing pip...............done.
(env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$ source
env/bin/activate
(env)kracekumar@python-lover:~/codes/python/andalucia$ pip install -r
requirements.txt
Downloading/unpacking Flask==0.6.1 (from -r requirements.txt (line 1))
  Downloading Flask-0.6.1.tar.gz (413Kb): 413Kb downloaded
  Running setup.py egg_info for package Flask

    warning: no previously-included files matching '*.pyc' found under
directory 'docs'
    warning: no previously-included files matching '*.pyo' found under
directory 'docs'
    warning: no previously-included files matching '*.pyc' found under
directory 'tests'
    warning: no previously-included files matching '*.pyo' found under
directory 'tests'
    warning: no previously-included files matching '*.pyc' found under
directory 'examples'
    warning: no previously-included files matching '*.pyo' found under
directory 'examples'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Flask-Actions==0.6.4 (from -r requirements.txt (line
2))
  Downloading Flask-Actions-0.6.4.tar.gz
  Running setup.py egg_info for package Flask-Actions

    warning: no files found matching '*.js' under directory
'flaskext/actions/project_template/static'
    warning: no previously-included files matching '*.pyc' found under
directory 'tests'
    warning: no previously-included files matching '*.pyc' found under
directory 'tests'
    warning: no previously-included files matching '*.pyc' found under
directory 'docs'
    warning: no previously-included files matching '*.pyo' found under
directory 'docs'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Flask-Celery==2.2.5 (from -r requirements.txt (line
3))
  Downloading Flask-Celery-2.2.5.tar.gz
  Running setup.py egg_info for package Flask-Celery

    WARNING: flaskext is a namespace package, but its __init__.py does
    not declare_namespace(); setuptools 0.7 will REQUIRE this!
    (See the setuptools manual under "Namespace Packages" for details.)

    no previously-included directories found matching 'tox.ini'
    no previously-included directories found matching 'flaskext/*.pyc'
    no previously-included directories found matching 'example/*.pyc'
    no previously-included directories found matching 'tests/*.pyc'
Downloading/unpacking Flask-MongoAlchemy==0.2a1 (from -r requirements.txt
(line 4))
  Downloading Flask-MongoAlchemy-0.2a1.tar.gz
  Running setup.py egg_info for package Flask-MongoAlchemy

Downloading/unpacking Flask-Script==0.3.1 (from -r requirements.txt (line
5))
  Downloading Flask-Script-0.3.1.tar.gz
  Running setup.py egg_info for package Flask-Script

    warning: no previously-included files matching '*.pyc' found under
directory 'docs'
    warning: no previously-included files matching '*.pyo' found under
directory 'docs'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Flask-Uploads==0.1.2 (from -r requirements.txt (line
6))
  Downloading Flask-Uploads-0.1.2.tar.gz
  Running setup.py egg_info for package Flask-Uploads

Downloading/unpacking Flask-WTF==0.5.2 (from -r requirements.txt (line 7))
  Downloading Flask-WTF-0.5.2.tar.gz (237Kb): 237Kb downloaded
  Running setup.py egg_info for package Flask-WTF

    warning: no previously-included files matching '*.pyc' found under
directory 'tests'
    warning: no previously-included files matching '*.pyc' found under
directory 'tests'
    warning: no previously-included files matching '*.pyc' found under
directory 'docs'
    warning: no previously-included files matching '*.pyo' found under
directory 'docs'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Jinja2==2.5.5 (from -r requirements.txt (line 8))
  Downloading Jinja2-2.5.5.tar.gz (438Kb): 438Kb downloaded
  Running setup.py egg_info for package Jinja2

    warning: no previously-included files matching '*' found under directory
'docs/_build'
    warning: no previously-included files matching '*.pyc' found under
directory 'jinja2'
    warning: no previously-included files matching '*.pyc' found under
directory 'docs'
    warning: no previously-included files matching '*.pyo' found under
directory 'jinja2'
    warning: no previously-included files matching '*.pyo' found under
directory 'docs'
Downloading/unpacking MongoAlchemy==0.8 (from -r requirements.txt (line 9))
  Downloading MongoAlchemy-0.8.tar.gz
  Running setup.py egg_info for package MongoAlchemy

Downloading/unpacking WTForms==0.6.3 (from -r requirements.txt (line 10))
  Downloading WTForms-0.6.3.zip (245Kb): 245Kb downloaded
  Running setup.py egg_info for package WTForms

    warning: no previously-included files matching '*' found under directory
'docs/_build'
    warning: no previously-included files matching '*.pyc' found under
directory 'tests'
Downloading/unpacking Werkzeug==0.6.2 (from -r requirements.txt (line 11))
  Downloading Werkzeug-0.6.2.tar.gz (1.7Mb): 1.7Mb downloaded
  Running setup.py egg_info for package Werkzeug

    no previously-included directories found matching 'docs/_build/doctrees'
Downloading/unpacking amqplib==0.6.1 (from -r requirements.txt (line 12))
  Downloading amqplib-0.6.1.tgz (53Kb): 53Kb downloaded
  Running setup.py egg_info for package amqplib

Downloading/unpacking anyjson==0.3.1 (from -r requirements.txt (line 13))
  Downloading anyjson-0.3.1.tar.gz
  Running setup.py egg_info for package anyjson

Downloading/unpacking argparse==1.2.1 (from -r requirements.txt (line 14))
  Downloading argparse-1.2.1.tar.gz (69Kb): 69Kb downloaded
  Running setup.py egg_info for package argparse

    warning: no previously-included files matching '*.pyc' found anywhere in
distribution
    warning: no previously-included files matching '*.pyo' found anywhere in
distribution
    warning: no previously-included files matching '*.orig' found anywhere
in distribution
    warning: no previously-included files matching '*.rej' found anywhere in
distribution
    no previously-included directories found matching 'doc/_build'
    no previously-included directories found matching 'env24'
    no previously-included directories found matching 'env25'
    no previously-included directories found matching 'env26'
    no previously-included directories found matching 'env27'
Downloading/unpacking celery==2.2.6 (from -r requirements.txt (line 15))
  Downloading celery-2.2.6.tar.gz (1.5Mb): 1.5Mb downloaded
  Running setup.py egg_info for package celery

    warning: no files found matching '*' under directory 'bin'
    no previously-included directories found matching 'tests/*.pyc'
    no previously-included directories found matching 'docs/*.pyc'
    no previously-included directories found matching 'contrib/*.pyc'
    no previously-included directories found matching 'celery/*.pyc'
    no previously-included directories found matching 'bin/*.pyc'
    no previously-included directories found matching 'docs/.build'
Downloading/unpacking celerymon==0.3.0 (from -r requirements.txt (line 16))
  Downloading celerymon-0.3.0.tar.gz
  Running setup.py egg_info for package celerymon

    warning: no files found matching '*.py' under directory 'celerymon'
    no previously-included directories found matching 'celerymon/*.pyc'
    no previously-included directories found matching 'bin/*.pyc'
Downloading/unpacking distribute==0.6.10 (from -r requirements.txt (line
17))
  Downloading distribute-0.6.10.tar.gz (385Kb): 385Kb downloaded
  Running setup.py egg_info for package distribute

Downloading/unpacking gevent==1.0dev (from -r requirements.txt (line 18))
  Could not find a version that satisfies the requirement gevent==1.0dev
(from -r requirements.txt (line 18)) (from versions: )
No distributions matching the version for gevent==1.0dev (from -r
requirements.txt (line 18))
Storing complete log in /home/kracekumar/.pip/pip.log
Traceback (most recent call last):
  File "/home/kracekumar/codes/python/andalucia/env/bin/pip", line 8, in
<module>
    load_entry_point('pip==1.0.1', 'console_scripts', 'pip')()
  File

"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/pip-1.0.1-py2.7.egg/pip/__init__.py",
line 116, in main
    return command.main(initial_args, args[1:], options)
  File

"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/pip-1.0.1-py2.7.egg/pip/basecommand.py",
line 151, in main
    log_fp = open_logfile(log_fn, 'w')
  File

"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/pip-1.0.1-py2.7.egg/pip/basecommand.py",
line 180, in open_logfile
    log_fp = open(filename, mode)
IOError: [Errno 13] Permission denied: '/home/kracekumar/.pip/pip.log'
(env)kracekumar@python-lover:~/codes/python/andalucia$ ls
andalucia      celeryconfig.py  paginator.py  requirements.txt  static
andalucia.ini  env              proxy.py      reset.sh
build          env.andalucia    README        run.sh
(env)kracekumar@python-lover:~/codes/python/andalucia$ python
andalucia/scripts.py runserver -p 8000
Traceback (most recent call last):
  File "andalucia/scripts.py", line 5, in <module>
    from flaskext.script import Manager
ImportError: No module named flaskext.script
(env)kracekumar@python-lover:~/codes/python/andalucia$

#scripts.py
(env)kracekumar@python-lover:~/codes/python/andalucia$ cat
andalucia/scripts.py #!/usr/bin/env python
import os
import sys

from flaskext.script import Manager
from flaskext.celery import install_commands as install_celery_commands

# setup project path
current_path = os.path.split(__file__)[0]
path = os.path.realpath(os.path.join(current_path, '..'))
sys.path.append(path)

from andalucia import app

manager = Manager(app)
install_celery_commands(manager)

if __name__ == "__main__":
    manager.run()
#requirements.py
(env)kracekumar@python-lover:~/codes/python/andalucia$ cat requirements.txt
Flask==0.6.1
Flask-Actions==0.6.4
Flask-Celery==2.2.5
Flask-MongoAlchemy==0.2a1
Flask-Script==0.3.1
Flask-Uploads==0.1.2
Flask-WTF==0.5.2
Jinja2==2.5.5
MongoAlchemy==0.8
WTForms==0.6.3
Werkzeug==0.6.2
amqplib==0.6.1
anyjson==0.3.1
argparse==1.2.1
celery==2.2.6
celerymon==0.3.0
distribute==0.6.10
gevent==1.0dev
greenlet==0.3.1
gunicorn==0.12.2
kombu==1.1.5
pylibmc==1.1.1
pymongo==1.11
pyparsing==1.5.5
python-dateutil==1.5
tornado==1.2.1
tproxy==0.5.4
translitcodec==0.2
wsgiref==0.1.2

Re: [flask] Flask examples

From:
Adam Patterson
Date:
2011-06-29 @ 19:04
couple of things

first gevent couldnt be installed with that version
  Could not find a version that satisfies the requirement gevent==1.0dev
(from -r requirements.txt (line 18)) (from versions: )
  No distributions matching the version for gevent==1.0dev (from -r
requirements.txt (line 18))

either remove the ==1.0dev portion or comment it out completely if you are
only using it in production. this is keeping everything from installing and
it just so happens that Flask-Script is the first thing imported

also you need to just `sudo rm ~/.pip/pip.log`  because pip cant write to it
(because you were using `sudo pip install` earlier).

let me know if it works after changing the gevent stuff


On Wed, Jun 29, 2011 at 1:55 PM, kracekumar ramaraju <
kracethekingmaker@gmail.com> wrote:

> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$
> virtualenv --no-site-packages env
> New python executable in env/bin/python
> Installing setuptools............done.
> Installing pip...............done.
> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia$ source
> env/bin/activate
> (env)kracekumar@python-lover:~/codes/python/andalucia$ pip install -r
> requirements.txt
> Downloading/unpacking Flask==0.6.1 (from -r requirements.txt (line 1))
>   Downloading Flask-0.6.1.tar.gz (413Kb): 413Kb downloaded
>
>   Running setup.py egg_info for package Flask
>
>     warning: no previously-included files matching '*.pyc' found under
> directory 'docs'
>     warning: no previously-included files matching '*.pyo' found under
> directory 'docs'
>     warning: no previously-included files matching '*.pyc' found under
> directory 'tests'
>     warning: no previously-included files matching '*.pyo' found under
> directory 'tests'
>     warning: no previously-included files matching '*.pyc' found under
> directory 'examples'
>     warning: no previously-included files matching '*.pyo' found under
> directory 'examples'
>
>     no previously-included directories found matching 'docs/_build'
>     no previously-included directories found matching 'docs/_themes/.git'
> Downloading/unpacking Flask-Actions==0.6.4 (from -r requirements.txt (line
> 2))
>   Downloading Flask-Actions-0.6.4.tar.gz
>
>   Running setup.py egg_info for package Flask-Actions
>
>     warning: no files found matching '*.js' under directory
> 'flaskext/actions/project_template/static'
>     warning: no previously-included files matching '*.pyc' found under
> directory 'tests'
>     warning: no previously-included files matching '*.pyc' found under
> directory 'tests'
>     warning: no previously-included files matching '*.pyc' found under
> directory 'docs'
>     warning: no previously-included files matching '*.pyo' found under
> directory 'docs'
>     no previously-included directories found matching 'docs/_build'
>     no previously-included directories found matching 'docs/_themes/.git'
> Downloading/unpacking Flask-Celery==2.2.5 (from -r requirements.txt (line
> 3))
>   Downloading Flask-Celery-2.2.5.tar.gz
>
>   Running setup.py egg_info for package Flask-Celery
>
>     WARNING: flaskext is a namespace package, but its __init__.py does
>     not declare_namespace(); setuptools 0.7 will REQUIRE this!
>     (See the setuptools manual under "Namespace Packages" for details.)
>
>     no previously-included directories found matching 'tox.ini'
>     no previously-included directories found matching 'flaskext/*.pyc'
>     no previously-included directories found matching 'example/*.pyc'
>     no previously-included directories found matching 'tests/*.pyc'
> Downloading/unpacking Flask-MongoAlchemy==0.2a1 (from -r requirements.txt
> (line 4))
>   Downloading Flask-MongoAlchemy-0.2a1.tar.gz
>
>   Running setup.py egg_info for package Flask-MongoAlchemy
>
> Downloading/unpacking Flask-Script==0.3.1 (from -r requirements.txt (line
> 5))
>   Downloading Flask-Script-0.3.1.tar.gz
>   Running setup.py egg_info for package Flask-Script
>
>
>     warning: no previously-included files matching '*.pyc' found under
> directory 'docs'
>     warning: no previously-included files matching '*.pyo' found under
> directory 'docs'
>     no previously-included directories found matching 'docs/_build'
>     no previously-included directories found matching 'docs/_themes/.git'
> Downloading/unpacking Flask-Uploads==0.1.2 (from -r requirements.txt (line
> 6))
>   Downloading Flask-Uploads-0.1.2.tar.gz
>
>   Running setup.py egg_info for package Flask-Uploads
>
> Downloading/unpacking Flask-WTF==0.5.2 (from -r requirements.txt (line 7))
>   Downloading Flask-WTF-0.5.2.tar.gz (237Kb): 237Kb downloaded
>   Running setup.py egg_info for package Flask-WTF
>
>
>     warning: no previously-included files matching '*.pyc' found under
> directory 'tests'
>     warning: no previously-included files matching '*.pyc' found under
> directory 'tests'
>     warning: no previously-included files matching '*.pyc' found under
> directory 'docs'
>     warning: no previously-included files matching '*.pyo' found under
> directory 'docs'
>     no previously-included directories found matching 'docs/_build'
>     no previously-included directories found matching 'docs/_themes/.git'
> Downloading/unpacking Jinja2==2.5.5 (from -r requirements.txt (line 8))
>   Downloading Jinja2-2.5.5.tar.gz (438Kb): 438Kb downloaded
>   Running setup.py egg_info for package Jinja2
>
>     warning: no previously-included files matching '*' found under
> directory 'docs/_build'
>     warning: no previously-included files matching '*.pyc' found under
> directory 'jinja2'
>
>     warning: no previously-included files matching '*.pyc' found under
> directory 'docs'
>     warning: no previously-included files matching '*.pyo' found under
> directory 'jinja2'
>
>     warning: no previously-included files matching '*.pyo' found under
> directory 'docs'
> Downloading/unpacking MongoAlchemy==0.8 (from -r requirements.txt (line 9))
>   Downloading MongoAlchemy-0.8.tar.gz
>
>   Running setup.py egg_info for package MongoAlchemy
>
> Downloading/unpacking WTForms==0.6.3 (from -r requirements.txt (line 10))
>   Downloading WTForms-0.6.3.zip (245Kb): 245Kb downloaded
>   Running setup.py egg_info for package WTForms
>
>     warning: no previously-included files matching '*' found under
> directory 'docs/_build'
>
>     warning: no previously-included files matching '*.pyc' found under
> directory 'tests'
> Downloading/unpacking Werkzeug==0.6.2 (from -r requirements.txt (line 11))
>   Downloading Werkzeug-0.6.2.tar.gz (1.7Mb): 1.7Mb downloaded
>   Running setup.py egg_info for package Werkzeug
>
>     no previously-included directories found matching
> 'docs/_build/doctrees'
>
> Downloading/unpacking amqplib==0.6.1 (from -r requirements.txt (line 12))
>   Downloading amqplib-0.6.1.tgz (53Kb): 53Kb downloaded
>
>   Running setup.py egg_info for package amqplib
>
> Downloading/unpacking anyjson==0.3.1 (from -r requirements.txt (line 13))
>   Downloading anyjson-0.3.1.tar.gz
>
>   Running setup.py egg_info for package anyjson
>
> Downloading/unpacking argparse==1.2.1 (from -r requirements.txt (line 14))
>   Downloading argparse-1.2.1.tar.gz (69Kb): 69Kb downloaded
>
>   Running setup.py egg_info for package argparse
>
>     warning: no previously-included files matching '*.pyc' found anywhere
> in distribution
>     warning: no previously-included files matching '*.pyo' found anywhere
> in distribution
>     warning: no previously-included files matching '*.orig' found anywhere
> in distribution
>     warning: no previously-included files matching '*.rej' found anywhere
> in distribution
>     no previously-included directories found matching 'doc/_build'
>     no previously-included directories found matching 'env24'
>     no previously-included directories found matching 'env25'
>     no previously-included directories found matching 'env26'
>     no previously-included directories found matching 'env27'
> Downloading/unpacking celery==2.2.6 (from -r requirements.txt (line 15))
>   Downloading celery-2.2.6.tar.gz (1.5Mb): 1.5Mb downloaded
>
>   Running setup.py egg_info for package celery
>
>     warning: no files found matching '*' under directory 'bin'
>     no previously-included directories found matching 'tests/*.pyc'
>     no previously-included directories found matching 'docs/*.pyc'
>     no previously-included directories found matching 'contrib/*.pyc'
>     no previously-included directories found matching 'celery/*.pyc'
>     no previously-included directories found matching 'bin/*.pyc'
>     no previously-included directories found matching 'docs/.build'
> Downloading/unpacking celerymon==0.3.0 (from -r requirements.txt (line 16))
>   Downloading celerymon-0.3.0.tar.gz
>
>   Running setup.py egg_info for package celerymon
>
>     warning: no files found matching '*.py' under directory 'celerymon'
>     no previously-included directories found matching 'celerymon/*.pyc'
>     no previously-included directories found matching 'bin/*.pyc'
> Downloading/unpacking distribute==0.6.10 (from -r requirements.txt (line
> 17))
>   Downloading distribute-0.6.10.tar.gz (385Kb): 385Kb downloaded
>
>   Running setup.py egg_info for package distribute
>
> Downloading/unpacking gevent==1.0dev (from -r requirements.txt (line 18))
>   Could not find a version that satisfies the requirement gevent==1.0dev
> (from -r requirements.txt (line 18)) (from versions: )
> No distributions matching the version for gevent==1.0dev (from -r
> requirements.txt (line 18))
> Storing complete log in /home/kracekumar/.pip/pip.log
> Traceback (most recent call last):
>   File "/home/kracekumar/codes/python/andalucia/env/bin/pip", line 8, in
> <module>
>
>     load_entry_point('pip==1.0.1', 'console_scripts', 'pip')()
>   File
> 
"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/pip-1.0.1-py2.7.egg/pip/__init__.py",
> line 116, in main
>
>     return command.main(initial_args, args[1:], options)
>   File
> 
"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/pip-1.0.1-py2.7.egg/pip/basecommand.py",
> line 151, in main
>
>     log_fp = open_logfile(log_fn, 'w')
>   File
> 
"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/pip-1.0.1-py2.7.egg/pip/basecommand.py",
> line 180, in open_logfile
>
>     log_fp = open(filename, mode)
> IOError: [Errno 13] Permission denied: '/home/kracekumar/.pip/pip.log'
> (env)kracekumar@python-lover:~/codes/python/andalucia$ ls
> andalucia      celeryconfig.py  paginator.py  requirements.txt  static
> andalucia.ini  env              proxy.py      reset.sh
> build          env.andalucia    README        run.sh
> (env)kracekumar@python-lover:~/codes/python/andalucia$ python
> andalucia/scripts.py runserver -p 8000
>
> Traceback (most recent call last):
>   File "andalucia/scripts.py", line 5, in <module>
>     from flaskext.script import Manager
> ImportError: No module named flaskext.script
> (env)kracekumar@python-lover:~/codes/python/andalucia$
>
> #scripts.py
> (env)kracekumar@python-lover:~/codes/python/andalucia$ cat
> andalucia/scripts.py #!/usr/bin/env python
> import os
> import sys
>
>
> from flaskext.script import Manager
> from flaskext.celery import install_commands as install_celery_commands
>
> # setup project path
> current_path = os.path.split(__file__)[0]
> path = os.path.realpath(os.path.join(current_path, '..'))
> sys.path.append(path)
>
> from andalucia import app
>
> manager = Manager(app)
> install_celery_commands(manager)
>
> if __name__ == "__main__":
>     manager.run()
> #requirements.py
> (env)kracekumar@python-lover:~/codes/python/andalucia$ cat
> requirements.txt
> Flask==0.6.1
>
> Flask-Actions==0.6.4
> Flask-Celery==2.2.5
> Flask-MongoAlchemy==0.2a1
>
> Flask-Script==0.3.1
> Flask-Uploads==0.1.2
> Flask-WTF==0.5.2
> Jinja2==2.5.5
> MongoAlchemy==0.8
> WTForms==0.6.3
> Werkzeug==0.6.2
> amqplib==0.6.1
> anyjson==0.3.1
> argparse==1.2.1
> celery==2.2.6
> celerymon==0.3.0
> distribute==0.6.10
> gevent==1.0dev
> greenlet==0.3.1
> gunicorn==0.12.2
> kombu==1.1.5
> pylibmc==1.1.1
> pymongo==1.11
> pyparsing==1.5.5
> python-dateutil==1.5
> tornado==1.2.1
> tproxy==0.5.4
> translitcodec==0.2
> wsgiref==0.1.2
>
>

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 19:23
Now new error:
(env)kracekumar@python-lover:~/codes/python/andalucia$ python
andalucia/scripts.py runserver -p 8000
Traceback (most recent call last):
  File "andalucia/scripts.py", line 6, in <module>
    from flaskext.celery import install_commands as install_celery_commands
  File

"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/flaskext/celery.py",
line 16, in <module>
    from celery.app import App, current_app as current_celery
  File

"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/celery/app/__init__.py",
line 16, in <module>
    from kombu.utils import cached_property
ImportError: No module named kombu.utils

#celeryconfig.py
(env)kracekumar@python-lover:~/codes/python/andalucia$ cat
andalucia/celeryconfig.py
CELERY_IMPORTS = ("andalucia.tasks",)

CELERY_RESULT_BACKEND = "mongodb"
CELERY_MONGODB_BACKEND_SETTINGS = {'host': 'localhost' }

BROKER_BACKEND = 'mongodb'
BROKER_HOST = "localhost"
#BROKER_PORT = 5672
#BROKER_USER = ""
#BROKER_PASSWORD = ""
#BROKER_VHOST = ""

CELERYD_LOG_FILE = "celeryd.log"
CELERYD_LOG_LEVEL = "ERROR"

#celery_action.py
(env)kracekumar@python-lover:~/codes/python/andalucia$ cat
andalucia/celery_actions.py
from celery.app import App, current_app as current_celer


def run_celeryd(app):
    """Runs a Celery worker node."""
    def _run_celeryd(hostname='',
                     concurrency='',
                     logfile='',
                     loglevel='',
                     beat=False,
                     queues='',
                     include='',
                     schedule='',
                     sceduler='',
                     purge=False,
                     time_limit='',
                     soft_time_limit='',
                     maxtasksperchild=''):
        from celery.bin.celeryd import WorkerCommand
        worker = WorkerCommand(app=current_celery())
        args = {}
        worker.run(args)
    return _run_celeryd

celery_actions = {'celeryd':run_celeryd}

Re: [flask] Flask examples

From:
Amirouche Boubekki
Date:
2011-06-29 @ 19:45
I think you are using an old version of the project. Please delete andalucia
folder and follow this steps:

~/ # hg clone https://bitbucket.org/abki/andalucia
~/andalucia/ # cd andalucia
(env) ~/andalucia/ # pip -E env install tproxy
(env) ~/andalucia/ # source env/bin/activate
(env) ~/andalucia/ # pip install -r requirements.txt
(env) ~/andalucia/andalucia/ # cd andalucia
(env) ~/andalucia/andalucia/ # python scripts.py -p 8000

open a new terminal window and go to ~/andalucia/ run these commands:

~/andalucia/ # source env/bin/activate
(env) ~/andalucia/ # tproxy proxy

open another terminal window

~/andalucia/ # source env/bin/activate
(env) ~/andalucia/ # cd andalucia
(env) ~/andalucia/andalucia/ # sh run_celery.sh

browser http://127.0.0.1:5000 and tell me what you see :)


2011/6/29 kracekumar ramaraju <kracethekingmaker@gmail.com>

> Now new error:
>
> (env)kracekumar@python-lover:~/codes/python/andalucia$ python
> andalucia/scripts.py runserver -p 8000
> Traceback (most recent call last):
>   File "andalucia/scripts.py", line 6, in <module>
>
>     from flaskext.celery import install_commands as install_celery_commands
>   File
> 
"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/flaskext/celery.py",
> line 16, in <module>
>     from celery.app import App, current_app as current_celery
>   File
> 
"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/celery/app/__init__.py",
> line 16, in <module>
>     from kombu.utils import cached_property
> ImportError: No module named kombu.utils
>
> #celeryconfig.py
> (env)kracekumar@python-lover:~/codes/python/andalucia$ cat
> andalucia/celeryconfig.py
> CELERY_IMPORTS = ("andalucia.tasks",)
>
> CELERY_RESULT_BACKEND = "mongodb"
> CELERY_MONGODB_BACKEND_SETTINGS = {'host': 'localhost' }
>
> BROKER_BACKEND = 'mongodb'
> BROKER_HOST = "localhost"
> #BROKER_PORT = 5672
> #BROKER_USER = ""
> #BROKER_PASSWORD = ""
> #BROKER_VHOST = ""
>
> CELERYD_LOG_FILE = "celeryd.log"
> CELERYD_LOG_LEVEL = "ERROR"
>
> #celery_action.py
> (env)kracekumar@python-lover:~/codes/python/andalucia$ cat
> andalucia/celery_actions.py
> from celery.app import App, current_app as current_celer
>
>
> def run_celeryd(app):
>     """Runs a Celery worker node."""
>     def _run_celeryd(hostname='',
>                      concurrency='',
>                      logfile='',
>                      loglevel='',
>                      beat=False,
>                      queues='',
>                      include='',
>                      schedule='',
>                      sceduler='',
>                      purge=False,
>                      time_limit='',
>                      soft_time_limit='',
>                      maxtasksperchild=''):
>         from celery.bin.celeryd import WorkerCommand
>         worker = WorkerCommand(app=current_celery())
>         args = {}
>         worker.run(args)
>     return _run_celeryd
>
> celery_actions = {'celeryd':run_celeryd}
>
>

Re: [flask] Flask examples

From:
Amirouche Boubekki
Date:
2011-06-29 @ 20:09
I updated andalucia README with better instructions (since I could run
tproxy this time).

just run this command inside andalucia folder:

~/andalucia/ # hg pull -u

I'm happy that people are trying andalucia but don't expect much :)

2011/6/29 Amirouche Boubekki <amirouche.boubekki@gmail.com>

> I think you are using an old version of the project. Please delete
> andalucia folder and follow this steps:
>
> ~/ # hg clone https://bitbucket.org/abki/andalucia
> ~/andalucia/ # cd andalucia
> (env) ~/andalucia/ # pip -E env install tproxy
> (env) ~/andalucia/ # source env/bin/activate
> (env) ~/andalucia/ # pip install -r requirements.txt
> (env) ~/andalucia/andalucia/ # cd andalucia
> (env) ~/andalucia/andalucia/ # python scripts.py -p 8000
>
> open a new terminal window and go to ~/andalucia/ run these commands:
>
> ~/andalucia/ # source env/bin/activate
> (env) ~/andalucia/ # tproxy proxy
>
> open another terminal window
>
> ~/andalucia/ # source env/bin/activate
> (env) ~/andalucia/ # cd andalucia
> (env) ~/andalucia/andalucia/ # sh run_celery.sh
>
> browser http://127.0.0.1:5000 and tell me what you see :)
>
>
> 2011/6/29 kracekumar ramaraju <kracethekingmaker@gmail.com>
>
>> Now new error:
>>
>> (env)kracekumar@python-lover:~/codes/python/andalucia$ python
>> andalucia/scripts.py runserver -p 8000
>> Traceback (most recent call last):
>>   File "andalucia/scripts.py", line 6, in <module>
>>
>>     from flaskext.celery import install_commands as
>> install_celery_commands
>>   File
>> 
"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/flaskext/celery.py",
>> line 16, in <module>
>>     from celery.app import App, current_app as current_celery
>>   File
>> 
"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/celery/app/__init__.py",
>> line 16, in <module>
>>     from kombu.utils import cached_property
>> ImportError: No module named kombu.utils
>>
>> #celeryconfig.py
>> (env)kracekumar@python-lover:~/codes/python/andalucia$ cat
>> andalucia/celeryconfig.py
>> CELERY_IMPORTS = ("andalucia.tasks",)
>>
>> CELERY_RESULT_BACKEND = "mongodb"
>> CELERY_MONGODB_BACKEND_SETTINGS = {'host': 'localhost' }
>>
>> BROKER_BACKEND = 'mongodb'
>> BROKER_HOST = "localhost"
>> #BROKER_PORT = 5672
>> #BROKER_USER = ""
>> #BROKER_PASSWORD = ""
>> #BROKER_VHOST = ""
>>
>> CELERYD_LOG_FILE = "celeryd.log"
>> CELERYD_LOG_LEVEL = "ERROR"
>>
>> #celery_action.py
>> (env)kracekumar@python-lover:~/codes/python/andalucia$ cat
>> andalucia/celery_actions.py
>> from celery.app import App, current_app as current_celer
>>
>>
>> def run_celeryd(app):
>>     """Runs a Celery worker node."""
>>     def _run_celeryd(hostname='',
>>                      concurrency='',
>>                      logfile='',
>>                      loglevel='',
>>                      beat=False,
>>                      queues='',
>>                      include='',
>>                      schedule='',
>>                      sceduler='',
>>                      purge=False,
>>                      time_limit='',
>>                      soft_time_limit='',
>>                      maxtasksperchild=''):
>>         from celery.bin.celeryd import WorkerCommand
>>         worker = WorkerCommand(app=current_celery())
>>         args = {}
>>         worker.run(args)
>>     return _run_celeryd
>>
>> celery_actions = {'celeryd':run_celeryd}
>>
>>
>

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 20:19
again same problem after instruction followed in prev mail
(env)kracekumar@python-lover:~/codes/python/andalucia/andalucia$ python
scripts.py -p 8000
Traceback (most recent call last):
  File "scripts.py", line 6, in <module>
    from flaskext.celery import install_commands as install_celery_commands
  File

"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/flaskext/celery.py",
line 16, in <module>
    from celery.app import App, current_app as current_celery
  File

"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/celery/app/__init__.py",
line 16, in <module>
    from kombu.utils import cached_property
ImportError: No module named kombu.utils

Re: [flask] Flask examples

From:
Amirouche Boubekki
Date:
2011-06-29 @ 20:28
try:

~/andalucia/ # source env/bin/activate
(env) ~/andalucia/ # pip install kombu

2011/6/29 kracekumar ramaraju <kracethekingmaker@gmail.com>

> again same problem after instruction followed in prev mail
> (env)kracekumar@python-lover:~/codes/python/andalucia/andalucia$ python
> scripts.py -p 8000
>
> Traceback (most recent call last):
>   File "scripts.py", line 6, in <module>
>
>     from flaskext.celery import install_commands as install_celery_commands
>   File
> 
"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/flaskext/celery.py",
> line 16, in <module>
>     from celery.app import App, current_app as current_celery
>   File
> 
"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/celery/app/__init__.py",
> line 16, in <module>
>     from kombu.utils import cached_property
> ImportError: No module named kombu.utils
>
>

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 21:16
Downloading/unpacking pylibmc
  Running setup.py egg_info for package pylibmc

Installing collected packages: pylibmc
  Running setup.py install for pylibmc
    building '_pylibmc' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -DUSE_ZLIB -I/usr/include/python2.7 -c
_pylibmcmodule.c -o build/temp.linux-i686-2.7/_pylibmcmodule.o
    In file included from _pylibmcmodule.c:34:0:
    _pylibmcmodule.h:42:36: fatal error: libmemcached/memcached.h: No such
file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    Complete output from command
/home/kracekumar/codes/python/andalucia/env/bin/python -c "import

setuptools;__file__='/home/kracekumar/codes/python/andalucia/env/build/pylibmc/setup.py';exec(compile(open(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))" install --single-version-externally-managed
--record /tmp/pip-tQrDHK-record/install-record.txt --install-headers
/home/kracekumar/codes/python/andalucia/env/include/site/python2.7:
    running install

running build

running build_py

copying pylibmc.py -> build/lib.linux-i686-2.7

running build_ext

building '_pylibmc' extension

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -DUSE_ZLIB -I/usr/include/python2.7 -c
_pylibmcmodule.c -o build/temp.linux-i686-2.7/_pylibmcmodule.o

In file included from _pylibmcmodule.c:34:0:

_pylibmcmodule.h:42:36: fatal error: libmemcached/memcached.h: No such file
or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /home/kracekumar/codes/python/andalucia/env/bin/python -c "import

setuptools;__file__='/home/kracekumar/codes/python/andalucia/env/build/pylibmc/setup.py';exec(compile(open(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))" install --single-version-externally-managed
--record /tmp/pip-tQrDHK-record/install-record.txt --install-headers
/home/kracekumar/codes/python/andalucia/env/include/site/python2.7 failed
with error code 1
Storing complete log in /home/kracekumar/.pip/pip.log

Re: [flask] Flask examples

From:
Amirouche Boubekki
Date:
2011-06-29 @ 21:38
It may not be clear enough in the readme, I assume you use ubuntu, you will
need to install this packages:

- python-dev
- memcached
- memcachedb
- libmemcache5
- libmemcachedprotocol0
- libmemcachedutil0
- libmemcached-dev
- libev3
- libevent
- libevent-core
- libevent-dev
- libevent-extra

2011/6/29 kracekumar ramaraju <kracethekingmaker@gmail.com>

> Downloading/unpacking pylibmc
>   Running setup.py egg_info for package pylibmc
>
> Installing collected packages: pylibmc
>   Running setup.py install for pylibmc
>     building '_pylibmc' extension
>     gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -DUSE_ZLIB -I/usr/include/python2.7 -c
> _pylibmcmodule.c -o build/temp.linux-i686-2.7/_pylibmcmodule.o
>     In file included from _pylibmcmodule.c:34:0:
>     _pylibmcmodule.h:42:36: fatal error: libmemcached/memcached.h: No such
> file or directory
>     compilation terminated.
>     error: command 'gcc' failed with exit status 1
>     Complete output from command
> /home/kracekumar/codes/python/andalucia/env/bin/python -c "import
> 
setuptools;__file__='/home/kracekumar/codes/python/andalucia/env/build/pylibmc/setup.py';exec(compile(open(__file__).read().replace('\r\n',
> '\n'), __file__, 'exec'))" install --single-version-externally-managed
> --record /tmp/pip-tQrDHK-record/install-record.txt --install-headers
> /home/kracekumar/codes/python/andalucia/env/include/site/python2.7:
>     running install
>
> running build
>
> running build_py
>
> copying pylibmc.py -> build/lib.linux-i686-2.7
>
> running build_ext
>
> building '_pylibmc' extension
>
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -DUSE_ZLIB -I/usr/include/python2.7 -c
> _pylibmcmodule.c -o build/temp.linux-i686-2.7/_pylibmcmodule.o
>
> In file included from _pylibmcmodule.c:34:0:
>
> _pylibmcmodule.h:42:36: fatal error: libmemcached/memcached.h: No such file
> or directory
>
> compilation terminated.
>
> error: command 'gcc' failed with exit status 1
>
> ----------------------------------------
> Command /home/kracekumar/codes/python/andalucia/env/bin/python -c "import
> 
setuptools;__file__='/home/kracekumar/codes/python/andalucia/env/build/pylibmc/setup.py';exec(compile(open(__file__).read().replace('\r\n',
> '\n'), __file__, 'exec'))" install --single-version-externally-managed
> --record /tmp/pip-tQrDHK-record/install-record.txt --install-headers
> /home/kracekumar/codes/python/andalucia/env/include/site/python2.7 failed
> with error code 1
>
> Storing complete log in /home/kracekumar/.pip/pip.log
>

Re: [flask] Flask examples

From:
Amirouche Boubekki
Date:
2011-06-29 @ 21:54
2011/6/29 Amirouche Boubekki <amirouche.boubekki@gmail.com>

> It may not be clear enough in the readme, I assume you use ubuntu, you will
> need to install this packages:
>
> - python-dev
> - memcached
> - memcachedb
> - libmemcache5
> - libmemcachedprotocol0
> - libmemcachedutil0
> - libmemcached-dev
> - libev3
> - libevent
> - libevent-core
> - libevent-dev
> - libevent-extra
>

I forgot about mongodb : « mongodb10gen see
instructions<http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages/>for
ubuntu and other distros on mongodb.org
»

You can come to #pocoo on irc.freenode.net or PM me. My username is abki_

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 21:47
@Adam:
No need for apologises we are after all humans bound by emotions :)

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 21:53
@Amirouche:
  Out of curiosity I am asking for performing microblogging,do we need such
big requirements :)

So can post to my blog using this app or is it restricted to identi.ca,twitter
only ?


-- 
*Winning Regards
KraceKumar.R
http://kracekumar.wordpress.com
+91-97906-58304
*

Re: [flask] Flask examples

From:
Amirouche Boubekki
Date:
2011-06-29 @ 22:13
2011/6/29 kracekumar ramaraju <kracethekingmaker@gmail.com>

>
> @Amirouche:
>   Out of curiosity I am asking for performing microblogging,do we need such
> big requirements :)
>

all the libev* stuff is for deployement not the dev server. tproxy use libev
though.
the celery stuff is for scaling.

If you want to build an application like twitter and identica you could use
this stack. Celery is
recommanded. See http://lanyrd.com/2011/europython/sftzp/

I told you it was experimental !


> So can post to my blog using this app or is it restricted to identi.ca,twitter
> only ?
>

there is no such features in andalucia currently.


>
>
> --
> *Winning Regards
> KraceKumar.R
> http://kracekumar.wordpress.com
> +91-97906-58304
> *
>

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 23:14
Finally I successfully installed the app with the help all you guys ,special
thanks for Amirouche for answering and spending Time in irc .Thanks a lot :)

Re: [flask] Flask examples

From:
Adam Patterson
Date:
2011-06-29 @ 21:23
Are you reading your own error messages?

You keep posting them and most times they are showing the exact error:

"fatal error: libmemcached/memcached.h: No such file or directory"

At least do some preliminary google searches before posting error messages
here.

Cheers

On Wed, Jun 29, 2011 at 4:16 PM, kracekumar ramaraju <
kracethekingmaker@gmail.com> wrote:

> Downloading/unpacking pylibmc
>   Running setup.py egg_info for package pylibmc
>
> Installing collected packages: pylibmc
>   Running setup.py install for pylibmc
>     building '_pylibmc' extension
>     gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -DUSE_ZLIB -I/usr/include/python2.7 -c
> _pylibmcmodule.c -o build/temp.linux-i686-2.7/_pylibmcmodule.o
>     In file included from _pylibmcmodule.c:34:0:
>     _pylibmcmodule.h:42:36: fatal error: libmemcached/memcached.h: No such
> file or directory
>     compilation terminated.
>     error: command 'gcc' failed with exit status 1
>     Complete output from command
> /home/kracekumar/codes/python/andalucia/env/bin/python -c "import
> 
setuptools;__file__='/home/kracekumar/codes/python/andalucia/env/build/pylibmc/setup.py';exec(compile(open(__file__).read().replace('\r\n',
> '\n'), __file__, 'exec'))" install --single-version-externally-managed
> --record /tmp/pip-tQrDHK-record/install-record.txt --install-headers
> /home/kracekumar/codes/python/andalucia/env/include/site/python2.7:
>     running install
>
> running build
>
> running build_py
>
> copying pylibmc.py -> build/lib.linux-i686-2.7
>
> running build_ext
>
> building '_pylibmc' extension
>
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -DUSE_ZLIB -I/usr/include/python2.7 -c
> _pylibmcmodule.c -o build/temp.linux-i686-2.7/_pylibmcmodule.o
>
> In file included from _pylibmcmodule.c:34:0:
>
> _pylibmcmodule.h:42:36: fatal error: libmemcached/memcached.h: No such file
> or directory
>
> compilation terminated.
>
> error: command 'gcc' failed with exit status 1
>
> ----------------------------------------
> Command /home/kracekumar/codes/python/andalucia/env/bin/python -c "import
> 
setuptools;__file__='/home/kracekumar/codes/python/andalucia/env/build/pylibmc/setup.py';exec(compile(open(__file__).read().replace('\r\n',
> '\n'), __file__, 'exec'))" install --single-version-externally-managed
> --record /tmp/pip-tQrDHK-record/install-record.txt --install-headers
> /home/kracekumar/codes/python/andalucia/env/include/site/python2.7 failed
> with error code 1
>
> Storing complete log in /home/kracekumar/.pip/pip.log
>

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 21:26
Ofcourse I read my error message and lot of error messages,I have not posted
because I was able to solve on my own . ..  .

Re: [flask] Flask examples

From:
Adam Patterson
Date:
2011-06-29 @ 21:29
Sorry my message came off more rude when I just trying to nudge you towards
google a little. I apologize for the tone.

On Wed, Jun 29, 2011 at 4:26 PM, kracekumar ramaraju <
kracethekingmaker@gmail.com> wrote:

> Ofcourse I read my error message and lot of error messages,I have not
> posted because I was able to solve on my own . ..  .
>

Re: [flask] Flask examples

From:
kracekumar ramaraju
Date:
2011-06-29 @ 21:17
I kept installing package via pip install package
finally pylimbc ,unable to install

Re: [flask] Flask examples

From:
Adam Patterson
Date:
2011-06-29 @ 19:42
I've got to run but its obviously something with kombu

check in ~/codes/python/andalucia/env/lib/python-<vservion>/site-packages/
to see if all your stuff is in there. try to pip install kombu (its in your
requirements.txt but just in case).


On Wed, Jun 29, 2011 at 2:23 PM, kracekumar ramaraju <
kracethekingmaker@gmail.com> wrote:

> Now new error:
>
> (env)kracekumar@python-lover:~/codes/python/andalucia$ python
> andalucia/scripts.py runserver -p 8000
> Traceback (most recent call last):
>   File "andalucia/scripts.py", line 6, in <module>
>
>     from flaskext.celery import install_commands as install_celery_commands
>   File
> 
"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/flaskext/celery.py",
> line 16, in <module>
>     from celery.app import App, current_app as current_celery
>   File
> 
"/home/kracekumar/codes/python/andalucia/env/lib/python2.7/site-packages/celery/app/__init__.py",
> line 16, in <module>
>     from kombu.utils import cached_property
> ImportError: No module named kombu.utils
>
> #celeryconfig.py
> (env)kracekumar@python-lover:~/codes/python/andalucia$ cat
> andalucia/celeryconfig.py
> CELERY_IMPORTS = ("andalucia.tasks",)
>
> CELERY_RESULT_BACKEND = "mongodb"
> CELERY_MONGODB_BACKEND_SETTINGS = {'host': 'localhost' }
>
> BROKER_BACKEND = 'mongodb'
> BROKER_HOST = "localhost"
> #BROKER_PORT = 5672
> #BROKER_USER = ""
> #BROKER_PASSWORD = ""
> #BROKER_VHOST = ""
>
> CELERYD_LOG_FILE = "celeryd.log"
> CELERYD_LOG_LEVEL = "ERROR"
>
> #celery_action.py
> (env)kracekumar@python-lover:~/codes/python/andalucia$ cat
> andalucia/celery_actions.py
> from celery.app import App, current_app as current_celer
>
>
> def run_celeryd(app):
>     """Runs a Celery worker node."""
>     def _run_celeryd(hostname='',
>                      concurrency='',
>                      logfile='',
>                      loglevel='',
>                      beat=False,
>                      queues='',
>                      include='',
>                      schedule='',
>                      sceduler='',
>                      purge=False,
>                      time_limit='',
>                      soft_time_limit='',
>                      maxtasksperchild=''):
>         from celery.bin.celeryd import WorkerCommand
>         worker = WorkerCommand(app=current_celery())
>         args = {}
>         worker.run(args)
>     return _run_celeryd
>
> celery_actions = {'celeryd':run_celeryd}
>
>

Re: [flask] Flask examples

From:
Peter Manser
Date:
2011-06-29 @ 16:35
That seems like a PYTHONPATH issue.

Check here, how to add your application root to the PYTHONPATH.

http://stackoverflow.com/questions/3402168/permanently-add-a-directory-to-pythonpath

hth.
Peter Manser

---
Skype: petermanser
Web: http://petermanser.ch


On Wednesday, June 29, 2011 at 6:32 PM, kracekumar ramaraju wrote:

> Hello
> I am breaking my head again :)
> 
(env.andalucia)kracekumar@python-lover:~/codes/python/andalucia/andalucia$
sudo pip install Flask-Script
> Requirement already satisfied (use --upgrade to upgrade): Flask-Script 
in /usr/local/lib/python2.7/dist-packages
>  Requirement already satisfied (use --upgrade to upgrade): Flask in 
/usr/local/lib/python2.7/dist-packages/Flask-0.6.1-py2.7.egg (from 
Flask-Script)
> Requirement already satisfied (use --upgrade to upgrade): argparse in 
/usr/lib/pymodules/python2.7 (from Flask-Script)
>  Requirement already satisfied (use --upgrade to upgrade): 
Werkzeug>=0.6.1 in /usr/lib/pymodules/python2.7 (from Flask->Flask-Script)
> Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in
/usr/lib/pymodules/python2.7 (from Flask->Flask-Script)
>  Cleaning up...
> 
(env.andalucia)kracekumar@python-lover:~/codes/python/andalucia/andalucia$
python scripts.py runserver -p 8000
> Traceback (most recent call last):
>  File "scripts.py", line 5, in <module>
>  from flaskext.script import Manager
> ImportError: No module named flaskext.script
> 
> sudo pip install Flask-Script results requirements satisfied.but python 
scripts.py runserver -p 8000 doesn't work. . . 
>  Now I feel there should be bundler like Rails 3,though people say 
virtualenv can solve that problem but I am facing it . . .
> 

Re: [flask] Flask examples

From:
Adam Patterson
Date:
2011-06-29 @ 16:40
you don't need `sudo` to install to a virtualenv that you already own. its
not installing to your virtualenv, but into  /usr/local/lib/python2.7/dist-
packages

try without sudo

On Wed, Jun 29, 2011 at 11:35 AM, Peter Manser <mail@petermanser.ch> wrote:

>  That seems like a PYTHONPATH issue.
>
> Check here, how to add your application root to the PYTHONPATH.
>
> 
http://stackoverflow.com/questions/3402168/permanently-add-a-directory-to-pythonpath
>
>
> 
<http://stackoverflow.com/questions/3402168/permanently-add-a-directory-to-pythonpath>
> hth.
> Peter Manser
>
> ---
> Skype: petermanser
> Web: http://petermanser.ch
>
> On Wednesday, June 29, 2011 at 6:32 PM, kracekumar ramaraju wrote:
>
> Hello
>  I am breaking my head again :)
> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia/andalucia$
> sudo pip install Flask-Script
> Requirement already satisfied (use --upgrade to upgrade): Flask-Script in
> /usr/local/lib/python2.7/dist-packages
> Requirement already satisfied (use --upgrade to upgrade): Flask in
> /usr/local/lib/python2.7/dist-packages/Flask-0.6.1-py2.7.egg (from
> Flask-Script)
> Requirement already satisfied (use --upgrade to upgrade): argparse in
> /usr/lib/pymodules/python2.7 (from Flask-Script)
> Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.6.1
> in /usr/lib/pymodules/python2.7 (from Flask->Flask-Script)
> Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in
> /usr/lib/pymodules/python2.7 (from Flask->Flask-Script)
> Cleaning up...
> (env.andalucia)kracekumar@python-lover:~/codes/python/andalucia/andalucia$
> python scripts.py runserver -p 8000
> Traceback (most recent call last):
>   File "scripts.py", line 5, in <module>
>     from flaskext.script import Manager
> ImportError: No module named flaskext.script
>
> sudo pip install Flask-Script results requirements satisfied.but python
> scripts.py runserver -p 8000 doesn't work. . .
> Now I feel there should be bundler like Rails 3,though people say
> virtualenv can solve that problem but I am facing it . . .
>
>
>