Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shyamz-22/bankingpy
This a simple flask example of Banking Kata implementation
https://github.com/shyamz-22/bankingpy
flask flask-application kata python-3-7 python3 webapplication
Last synced: 3 days ago
JSON representation
This a simple flask example of Banking Kata implementation
- Host: GitHub
- URL: https://github.com/shyamz-22/bankingpy
- Owner: shyamz-22
- Created: 2018-11-07T11:00:04.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T04:03:43.000Z (almost 2 years ago)
- Last Synced: 2023-05-04T05:41:05.382Z (over 1 year ago)
- Topics: flask, flask-application, kata, python-3-7, python3, webapplication
- Language: Python
- Size: 101 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Banking
This a simple [flask](http://flask.pocoo.org/) example of [Banking Kata](http://kata-log.rocks/banking-kata "Banking Kata")
## Project Structure
The structure of the project is [Divisional](http://exploreflask.com/en/latest/blueprints.html#divisional)
## Setup
- [Pipenv](https://pipenv.readthedocs.io/en/latest/)
- Python 3.7
- Flask
- Jinja2
- mysqlclient## Installing mysqlclient on macOS Mojave
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`
```bash
> 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`
## DB Migration
`flask-migrate` is used for database migrations. Go into `app` package and do the following
1. To initialize database migration for the first time execute `flask db init`
2. To Create migration script automatically execute `flask db migrate -m "users table"`
3. To apply the migration run `flask db upgrade`## Running the application
```bash
> export APP_SETTINGS="app.config.DevelopmentConfig"
> flask run```