The Restful-API for planning and monitoring personal financial. This project is designed for working with mobile application.
-
$ mkdir personalFinanceMonitor $ cd personalFinanceMonitor $ python -m venv env
when activate we will see$ env\Scripts\activate
if you want to deactivate(env) $ D:\personalFinanceMonitor>
$ deactivate
-
$ pip install -r "requirements.txt"
-
$ docker pull mysql $ docker pull phpmyadmin/phpmyadmin
$ docker run --name=keeplearning -e MYSQL_ROOT_PASSWORD=keep1234 -e MYSQL_DATABASE=PFM -p 3306:3306 -d mysql
$ docker exec -it PFM bash root@PFM:/# mysql -u root -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword';
if you want to quit from shell databasemysql> show databases;
mysql> quit;
you can access Web GUI Phpmyadmin through http://localhost:8081$ docker run --name myadmin -d --link PFM:db -p 8081:80 phpmyadmin/phpmyadmin
- Walkthrough GUI Phpmyadmin to create new database
- In alembic.ini file change attribute 'sqlalchemy.url' to point the new one
- Apply the migration
-
$ pytest tests/
$ coverage run -m pytest
$ coverage report
An HTML report in the htmlcov/ directory and you can see on browser by open index.html$ coverage html
-
$ alembic revision -m "version message"
$ alembic upgrade head
-
- when have to define relationship between two tables, in the class model you must to declare variable that represent to another pair relationship table like user with goal table have the relationship to be one to many relatively. in relationship variable is assigned with relationship() function in format ({related class name}, back_populates={relationship variable name})