radenkovic / python-template

Low dependency python template with black, flake8, pytest and poetry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Template

Simple Python template with pytest, black, and flake8

This is a super simple template for python3.11. It includes configs for VSCode (test runner config and project config)

Getting Started

  • Install poetry first
  • python3.11 -m venv venv (to create virtualenv)
  • Install poetry if needed
  • Development: poetry install --with jupyter
    • with --jupyter only if you need notebooks
  • Production: poetry install --only main

Includes

  • Uses poetry as package manager
  • Tests integrated in VSCode (tests panel)
  • Sorts out PYTHONPATHs
    • tests
    • notebooks
    • vscode debugger
  • Notebook imports from venv working
  • black for formatting
  • flake8 for linting

requirements.txt generation

poetry export --without-hashes --with dev --format=requirements.txt > requirements.txt

About

Low dependency python template with black, flake8, pytest and poetry


Languages

Language:Jupyter Notebook 77.2%Language:Python 22.8%