Flask REST-API for storing, editing and searching recipes.
- A Unix-like environment (e.g. Linux, OS X)
- Python 3.6 or newer
- mariaDB
-
Install the requirements, e.g. with virtualenv:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt -
Optional: create
config.pyinside the instance directory and adjust configuration.
-
Run in development mode (with
venvactivated):python run.py
Command line interface for administration of the user data base.
Start serving the command-line API on a suitable port, e.g.:
export FLASK_APP=recapi/user_cli.py FLASK_RUN_PORT=8083
Available commands:
-
flask add --user USER --display DISPLAY_NAME [--admin true|false]: Creates a new user. Will prompt for password. Default value for admin isfalse -
flask show --user USER: Displays user info. -
flask showall: Shows the entire user data base. -
flask check --user USER: Authenticates userUSER. Will prompt for password. -
flask deactivate --user USER: SetsUSER's status to passive. -
flask changepw --user USER: Change password forUSER.