
Flask API Tools
Utilities for building, running, and maintaining Python APIs with Flask and
associated Flask extensions.
Installation
Install and update using pip
:
pip install -U flask-api-tools
Tools
Developing
The build pipeline requires your tests to pass and code to be formatted
Make sure you have Python 3.x installed on your machine (use pyenv).
Install the dependencies with pipenv (making sure to include dev and pre-release packages):
pipenv install --dev --pre
Configure your environment:
pipenv shell && export PYTHONPATH="$PWD"
Run the tests:
pytest
Or with logging:
pytest -s
Or tests with coverage:
pytest --cov=./
Format the code with Black:
black $PWD
Releases
Cleanup the (.gitignored) dist
folder (if you have one):
rm -rf dist
Notch up the version number in setup.py
and build:
python3 setup.py sdist bdist_wheel
Push to PyPi (using the ScholarPack credentials when prompted)
python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
Links