This project consists of different examples I used for learning python. It also has pointers to folder structure, tools for testing , project setup etc.
For Mac, install python 3.8 using:
brew install python@3.8
- Install virtualenv
pip3 install virtualenv --user
- Setup virtual environment for the project
virtualenv -p /usr/local/opt/python@3.8/bin/python3 venv
- Activate virtualenv
source venv/bin/activate
echo 'Installing dev dependencies...'
pip install -r requirements-dev.txt
echo 'Installing test dependencies...'
pip install -r tests/requirements.txt
echo 'Installing test dependencies...'
pip install -r basics/requirements.txt
pre-commit install
In order to check for conventions using flake8 run command:
flake8 .
The flake8 configuration can be found in setup.cfg in section flake8.
black .
pytest tests
safety
bandit -r .
https://github.com/vintasoftware/python-linters-and-code-analysis
- Code Style: flake8