userapi is a simple Flask api for managing users. It's meant to be small and lightweight.
The default database for production is postgres but you can very easily change that in the config.py file yourself by changing the SQLALCHEMY_DATABASE_URI
value to a valid connection string.
$ export FLASK_ENV=dev|test|prod
$ export FLASK_APP=$(pwd)/app.py
$ pip install -r requirements.txt
Note: If FLASK_ENV is set to dev or test, you can ignore this step. SQLite is used by default.
# install database dependencies
$ pip install psycopg2
# create a postgres database named 'userapi'
$ flask db init
$ flask db migrate
$ flask db upgrade
python -c "import app; app.create_user('username', 'password')"
$ flask run
$ gunicorn --bind 0.0.0.0:8000 wsgi
$ pip install -r testrequirements.txt
$ py.test --cov-report=term-missing --cov=app tests/