Re: [falcon] How To Structure Large Falcon Applications?
- Oscar Carballal
- 2015-02-26 @ 11:36
It depends on your own style... in my case I split it pretty close to a
I create a main directory, and inside it I create the virtual enviroment
directory and a clone of the repository.
Within the project itself, I split everything into resources, models,
database related code, utilities and settings
The resulting tree is something like this:
| |- nginx
| |- uwsgi
| |- auth
| | |- basicauth.py
| | |- oauth.py
| |- resource1.py
| |- resource2.py
| |- model1.py
| |- model2.py
| |- connectors.py
| |- middleware1.py
| |- utils1.py
| |- development.py
| |- staging.py
| |- production.py
|- requirements (dynamic pip requirements)
| |- common.txt
| |- dev.txt
| |- production.txt
On app.py I add both commands that I would like to run (usually syncdb,
generate a test database, create an admin user) adn the application itself.
My main project is organized like that: https://github.com/clione/sikre
I hope this is useful to you. I guess I can make a structure cookbook for
falcon when I have some spare time...
Oscar Carballal Prego - Senior Software Developer
http://oscarcp.com | @pizte
On 26 February 2015 at 11:16, Sumej <firstname.lastname@example.org> wrote:
> I haven't find how to organize Falcon to great application:
> I have read "How To Structure Large Flask Applications"
> , but I am noob to do same for Falcon.
> I want write example if someone will help me.