Skip to content

A set of tools and linters for starting a new python project that follows best practices

License

Notifications You must be signed in to change notification settings

BTruer/python-for-production-starter

Repository files navigation

Production grade python repo starter

Prereqs:

  1. pyenv
  2. pipenv

How to use

  1. Pick a python version (set to 3.7.0 by default) and update the following files to match that version: tox.ini, pyproject.toml, .pre-commit-config.yaml, .python-version, Pipfile, mypy.ini
  2. Install the python version you want pyenv install 3.7.0
  3. Point pipenv to the python version pipenv --python /Users/user/.pyenv/versions/3.7.0/bin/python3.7
  4. pipenv install --dev
  5. pipenv shell
  6. pre-commit install

The following tools have been installed:

  1. flake8 - linting tool for clean code
  2. flake8-docstrings - enforces doc strings
  3. black - auto code formatter
  4. pre-commit - runs scripts/tools before commiting anything
  5. mypy - static type checker for Python
  6. tox - automated testing
  7. pytest - testing framework

To change the version of Python you will need to change the python version references on all configuration files.

TODO: Add bandit for security and logging standards

About

A set of tools and linters for starting a new python project that follows best practices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages