Make sure that you have Python 3.7 or later installed.
You can use pipenv.
Go to project directory and run command (you can replace 3.7 by Python version you've installed).
pipenv --python 3.7
pipenv installIf you don't have MySQL then you can use dockerized version:
docker run -p 3306:3306 --name tortoise-example-mysql -e MYSQL_ROOT_PASSWORD=root -d mysql:8.0
docker start tortoise-example-mysqlGet your container id (docker ps) and connect to container:
docker exec -it [container_id] mysql -uroot -prootRun following queries to create user and databases:
CREATE DATABASE IF NOT EXISTS tortoise;
CREATE DATABASE IF NOT EXISTS alchemy;
CREATE USER 'test_user'@'%' IDENTIFIED BY 'test1234';
GRANT ALL PRIVILEGES ON tortoise.* TO 'test_user'@'%';
GRANT ALL PRIVILEGES ON alchemy.* TO 'test_user'@'%';Go to src_tortoise directory.
Activate venv:
pipenv shellRun migrations:
aeris upgradeInstall fixtures:
python app.py initActivate venv if you haven't done that before:
pipenv shellRun server:
python app.pyOpen http://localhost:8080/user in your web browser.
- GET
/user- list of users withusernameandemail - GET
/user/name- list of usernames - GET
/user/full- list of users with assigned groups and addresses
Go to src_alchemy directory.
Activate venv:
pipenv shellRun migrations:
alembic upgrade headInstall fixtures:
python app.py initActivate venv if you haven't done that before:
pipenv shellRun server:
python app.pyOpen http://localhost:8080/user in your web browser.
- GET
/user- list of users withusernameandemail - GET
/user/name- list of usernames - GET
/user/full- list of users with assigned groups and addresses