Fbone (Flask bone) is a Flask (Python microframework) template/bootstrap/boilerplate application, with best practices.
You can use it for
- learning Flask.
- kicking off your new project faster.
- Handle orm with SQLAlchemy.
- Handle web forms with WTForms.
- Implement user session management (signin/signout/rememberme) with Flask-Login.
- Implement reset password via email with Flask-Mail.
- Implement unit testing with Flask-Testing.
- Implement external script (initdb/testing/etc) with Flask-Script.
- Handle i18n with Flask-Babel.
- Well designed structure for a large project.
- Quickly Deploy via fabric.
- Admin interface.
- Homebaked logger.
Pre-required:
- git
- pip
- sqlite
- virtualenv
$ python manage.py runserver
Then open http://127.0.0.1:5000
IMPORTANT:
- Change
INSTANCE_FOLDER_PATH
infbone/utils.py
to suit yourself. - Put
*.cfg
underINSTANCE_FOLDER_PATH
.
## STRUCTURE
├── fbone (main app)
│ ├── app.py (application factory)
│ ├── config.py (config module)
│ ├── decorators.py (route decorators)
│ ├── extensions.py (flask extensions)
│ ├── modules (MVC modules)
│ │ ├── admin (admin module)
│ │ ├── api (api module)
│ │ ├── frontend (frontend module)
│ │ ├── settings (settings module)
│ │ └── user (user module)
│ │ ├── __init__.py
│ │ ├── constants.py
│ │ ├── forms.py
│ │ ├── models.py
│ │ └── views.py
│ ├── static
│ │ ├── css
│ │ ├── img
│ │ └── js
│ ├── templates
│ ├── translations (i18n)
│ ├── utils.py
├── LICENSE
├── manage.py (manage via flask-script)
├── README.md
└── tests (unit tests, run via `nosetest`)
Thanks to Python, Flask, its extensions, and other goodies.