A template for some new Python tool or package with a reasonable basic setup.

Overview

python-app-template

Test Coverage Docs

A template with a reasonable basic setup, including:

  • black (formatting)
  • flake8 (linting)
  • mypy (type checking)
  • isort (import sorting)
  • pre-commit (check/fix the things above and more on each commit)
  • poetry (dependency and venv management)
  • pytest (testing)
  • tox (test against multiple Python versions even locally)
  • pytest-cov (compute coverage, uploaded to codecov.io)
  • pdoc3 (generate documentation, deployed to Github Pages)

Inspired by Hypermodern Python and blog posts like this. You can look there for more tools and other choices.

  • If you are building a CLI app, consider using Typer
  • If you are building a web app, consider using FastAPI

Setup

  • Change the package name and path to the repository everywhere
  • configure Github Pages in the settings
  • and set tokens in the CI if the repository is not public

Development

This project uses Poetry for dependency management.

Clone this repository and run poetry install.

Run pre-commit install to enable pre-commit hooks for linting and sanity checks.

To locally generate documentation, run pdoc -o docs python_app_template.

To locally run tests and get coverage information, use pytest --cov.

To run the tests with different Python versions, run tox. For that, you should install the Python versions in the .python-version file. You can use pyenv to do that and switch between them as you please.

You might also like...
A Project Template With Python
A Project Template With Python

File Structure . ├── LICENSE ├── Makefile # commands ├── README.md ├──

Bleeding edge django template focused on code quality and security.

wemake-django-template Bleeding edge django2.2 template focused on code quality and security. Purpose This project is used to scaffold a django projec

Project template layout for Django 3.0+

Django 3.0+ project template This is a simple Django 3.0+ project template with my preferred setup. Most Django project templates make way too many as

Bleeding edge django template focused on code quality and security.

wemake-django-template Bleeding edge django2.2 template focused on code quality and security. Purpose This project is used to scaffold a django projec

Django Webpack starter template for using Webpack 5 with Django 3.1 & Bootstrap 4. Yes, it can hot-reload.

Django Webpack Starter Hello fellow human. The repo uses Python 3.9.* Django 3.1.* Webpack 5.4.* Bootstrap 4.5.* Pipenv If you have any questions twe

A Django starter template with a sound foundation.

SOS Django Template SOS Django Tempalate is a Django starter template that has opinionated and good solutions while starting your new Django project.

Ultimate Django3.2 Template for starting any project from not zero!

Ultimate Django3.2 Template for starting any project from not zero!

Template repository to build PyTorch projects from source on any version of PyTorch/CUDA/cuDNN.

Template repository to build PyTorch projects from source on any version of PyTorch/CUDA/cuDNN.

A template repository implementing HTML5 Boilerplate 8.0 in Sanic using the Domonic framework.

sanic-domonic-h5bp A template repository implementing HTML5 Boilerplate 8.0 in Sanic using the Domonic framework. If you need frontend interactivity,

Releases(v0.10.3)
Owner
Anton Pirogov
Anton Pirogov
A python starter package to be used as a template for creating your own python packages.

Python Starter Package This is a basic python starter package to be used as a template for creating your own python packages. Github repo: https://git

Mystic 1 Apr 4, 2022
A test Django application with production-level docker setup

DockerApp A test Django application with production-level docker setup. Blog: https://medium.com/@siddharth.sahu/the-near-perfect-dockerfile-for-djang

Siddharth Sahu 44 Nov 18, 2022
Setup a flask project using a single command, right from creating virtual environment to creating Procfile for deployment.

AutoFlask-Setup About AutoFlask-Setup can help you set up a new Flask Project, right from creating virtual environment to creating Procfile for deploy

Ashutosh Krishna 1 Oct 21, 2021
Cookiecutter-allpurpose-minimal-python - A simple cookiecutter template for general-purpose python projects.

cookiecutter-allpurpose-minimal-python A simple cookiecutter template for general-purpose python projects. To use, run pip install cookiecutter cookie

E. Tolga Ayan 2 Jan 24, 2022
Generic template for python service

Cookie cutter template example Technology stack Flask Gevent UWSGI Poetry Docker Docker-compose Installation pip install cookiecutter cookiecutter git

Churkin Oleg 11 Oct 22, 2022
Generic python project template

generic-python-project-template generic-python-project-template STEPS - STEP 01- Create a repository by using template repository STEP 02- Clone the n

SUNNY BHAVEEN CHANDRA 3 Oct 3, 2022
Code Kata Python Template

Code Kata Python Template This is the code kata template for python created by Aula de Software Libre de la Universidad de Córdoba Step 1. Use this re

Sergio Gómez 2 Nov 30, 2021
Template to quickly start your playwright-python project

Playwright-python template ?? Template to quickly start your playwright-python project Getting started • Demo • Configuration Getting started Clone th

Constantin 1 Dec 13, 2021
A cookiecutter template for python scripts

cookiecutter-py-script A cookiecutter template for python scripts Prerequisites Git Usage pip install cookiecutter

Zeheng Li 1 Dec 14, 2022
A low dependency and really simple to start project template for Python Projects.

Python Project Template A low dependency and really simple to start project template for Python Projects. HOW TO USE THIS TEMPLATE DO NOT FORK this is

Yurii Dubinka 5 Jan 21, 2022