Manekineko is a fork of Fbone, a Flask (Python microframework) boilerplate application with best practices, using a domain driven approach.
You can use it for:
- learning Flask
- kicking off your new project faster
- having a highly scalable and modular app structure
- Handle orm with SQLAlchemy
- Handle migrations with Flask-Migrate and Alembic
- Handle web forms with WTForms
- Implement user session management with Flask-Login
- Implement reset password via email with Flask-Mail
- Implement unit testing with Pytest
- Implement external script with Flask-Script
- Handle i18n with Flask-Babel
- Well designed structure for large projects
- Quick deploys via fabric
- Admin interface
- Homebaked logger
Pre-required:
- git
- pip
- sqlite
Suggested:
- virtualenv
- virtualenv wrapper
- MySQL/PostgreSQL
To get started, verify database settings in fbone/config.py
then run:
$ python manage.py initdb
Then start the server with:
$ 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
│ ├── factory.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
│ │ ├── commands.py
│ │ ├── constants.py
│ │ ├── forms.py
│ │ ├── models.py
│ │ └── views.py
│ ├── core (core app utilities)
│ │ ├── email.py (email methods)
│ │ ├── flash.py (flask.flash() wrapper)
│ │ ├── helpers.py (convenience functions and classes)
│ │ └── oauth.py (oauth settings and provider logic)
│ ├── static
│ │ ├── css
│ │ ├── img
│ │ └── js
│ ├── templates
│ ├── translations (i18n)
│ ├── utils.py
├── LICENSE
├── manage.py (manage via flask-script)
├── README.md
└── tests (unit tests, run with pytest)
Thanks to Flask extension authors, various blogs, and the hard work of:
Original work done by:
- Wilson Xu, created Fbone
- Muhammad Ahsan Ali, original Manekineko fork