This a simple flask example of Banking Kata
The structure of the project is Divisional
- Pipenv
- Python 3.7
- Flask
- Jinja2
- mysqlclient
If you get the following error while installing mysqlclient
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
Export these flags for the compilers to find OpenSSL in zsh
> export LDFLAGS="-L/usr/local/opt/openssl/lib"
> export CPPFLAGS="-I/usr/local/opt/openssl/include"
To find the right flags run brew info openSSL
flask-migrate
is used for database migrations. Go into app
package and do the following
- To initialize database migration for the first time execute
flask db init
- To Create migration script automatically execute
flask db migrate -m "users table"
- To apply the migration run
flask db upgrade
> export APP_SETTINGS="app.config.DevelopmentConfig"
> flask run