Python Project Template

Overview

Python Project Template

A low dependency and really simple to start project template for Python Projects.

See also Flask-Project-Template for a full feature Flask project including database, API, admin interface, etc.

HOW TO USE THIS TEMPLATE

DO NOT FORK this is meant to be used from Use this template feature.

  1. Click on Use this template
  2. Give a name to your project
    (e.g. my_awesome_project recommendation is to use all lowercase and underscores separation for repo names.)
  3. Wait until the first run of CI finishes
    (Github Actions will process the template and commit to your new repo)
  4. If you want codecov Reports and Automatic Release to PyPI
    On the new repository settings->secrets add your PIPY_API_TOKEN and CODECOV_TOKEN (get the tokens on respective websites)
  5. Read the file CONTRIBUTING.md
  6. Then clone your new project and happy coding!

NOTE: WAIT until first CI run on github actions before cloning your new project.

What is included on this template?

  • 🖼️ Templates for starting multiple application types:
    • Basic low dependency Python program (default) use this template
    • Flask with database, admin interface, restapi and authentication use this template. or Run make init after cloning to generate a new project based on a template.
  • 📦 A basic setup.py file to provide installation, packaging and distribution for your project.
    Template uses setuptools because it's the de-facto standard for Python packages, you can run make switch-to-poetry later if you want.
  • 🤖 A Makefile with the most useful commands to install, test, lint, format and release your project.
  • 📃 Documentation structure using mkdocs
  • 💬 Auto generation of change log using gitchangelog to keep a HISTORY.md file automatically based on your commit history on every release.
  • 🐋 A simple Containerfile to build a container image for your project.
    Containerfile is a more open standard for building container images than Dockerfile, you can use buildah or docker with this file.
  • 🧪 Testing structure using pytest
  • Code linting using flake8
  • 📊 Code coverage reports using codecov
  • 🛳️ Automatic release to PyPI using twine and github actions.
  • 🎯 Entry points to execute your program using python -m or $ project_name with basic CLI argument parsing.
  • 🔄 Continuous integration using Github Actions with jobs to lint, test and release your project on Linux, Mac and Windows environments.

Curious about architectural decisions on this template? read ABOUT_THIS_TEMPLATE.md
If you want to contribute to this template please open an issue or fork and send a PULL REQUEST.


project_name

codecov CI

project_description

Install it from PyPI

pip install project_name

Usage

from project_name import BaseClass
from project_name import base_function

BaseClass().base_method()
base_function()
$ python -m project_name
#or
$ project_name

Development

Read the CONTRIBUTING.md file.

Comments
  • Rename-project won't run by default

    Rename-project won't run by default

    Describe the bug Action Rename-project won't run without elevating workflow permissions

    To Reproduce Click the link in readme ( https://github.com/rochacbruno/python-project-template/generate ) Name the project Go into actions and error should be there

    Expected behavior AFAIK this can not be worked around. Probably update readme so newbs like me don't spend 30 minutes hunting git docs for a solution. I have like 1 hour of work experience in GitHub so can't advise how it should be solved.

    Error Log remote: Permission to jdobruchowski/Oracle-REST-SQL-util-.git denied to github-actions[bot]. fatal: unable to access 'https://github.com/jdobruchowski/Oracle-REST-SQL-util-/': The requested URL returned error: 403 Error: Invalid status code: 128 at ChildProcess. (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19) at ChildProcess.emit (events.js:314:20) at maybeClose (internal/child_process.js:1022:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) { code: 128 } Error: Invalid status code: 128 at ChildProcess. (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19) at ChildProcess.emit (events.js:314:20) at maybeClose (internal/child_process.js:1022:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

    bug help wanted 
    opened by jdobruchowski 2
  • fix typo

    fix typo

    Summary :memo:

    Small fix for a typo in readme.md file

    Details

    1. changed readme.md

    Checks

    • [ ] Closed #798
    • [ ] Tested Changes
    • [ ] Stakeholder Approval
    opened by osbm 0
  • cleanups

    cleanups

    Summary :memo:

    Write an overview about it.

    Details

    Describe more what you did on changes.

    1. (...)
    2. (...)

    Bugfixes :bug: (delete if dind't have any)

    Checks

    • [ ] Closed #798
    • [ ] Tested Changes
    • [ ] Stakeholder Approval
    opened by rochacbruno 0
  • wrong version pushed to pypi

    wrong version pushed to pypi

    https://github.com/rochacbruno/python-project-template/blob/3b55b1c022d54fba2c8604cc56d7daccba310352/Makefile#L82-L87

    maybe the line

        @git tag $${TAG}
    

    should be moved to behind the line

        @git commit -m "release: version $${TAG} 🚀"
    

    ?

    Thanks for your effort. A very useful template.

    opened by oirontro 0
  • Add basic ArgParse example

    Add basic ArgParse example

    The file https://github.com/rochacbruno/python-project-template/blob/main/project_name/main.py is missing a simple implementation of a CLI using ArgParse from stdlib.

    opened by rochacbruno 0
  • [bug] Fix generation when project name has dashes and upper case

    [bug] Fix generation when project name has dashes and upper case

    Example of generated repo

    https://github.com/rochacbruno/This-Is_Great

    This-Is_Great is replaced as This_Is_Great and it doesn't match repo URL.

    Read a new variable on rename_project.sh script and job, use this as repo_slug on specific places as readme badges and URLS.

    bug 
    opened by rochacbruno 0
Releases(0.1.2)
Owner
Bruno Rocha
Programmer at @RedHatOfficial. #Python #Rust . Working on: @ansible @python #dynaconf @codeshow
Bruno Rocha
Model synchronization from dbt to Metabase.

dbt-metabase Model synchronization from dbt to Metabase. If dbt is your source of truth for database schemas and you use Metabase as your analytics to

Mike Gouline 270 Jan 08, 2023
Wunderland desktop wallpaper and Microsoft Teams background.

Wunderland Professional Impress your colleagues, friends and family with this edition of the "Wunderland" wallpaper. With the nostalgic feel of the or

3 Dec 14, 2022
ERPNext Easy Letterhead

ERPNext Easy Letterhead Intro Quality letterheads are a problem for non-technical users. So we've built (really hacked together) a slightly easier sol

Bantoo 3 Jan 02, 2023
Simple Calculator Mobile Apps

Simple Calculator Mobile Apps Screenshoot If you want to try it please click the link below to download, this application is 100% safe no virus. link

0 Sep 24, 2022
Blender 3.0 Python - Open temporary areas in the Text Editor

PopDrawers When editing text in Blender, it can be handy to have areas like Info, Console, Outliner, etc visible on screen to help with scripting. How

SpectralVectors 7 Nov 16, 2022
Trackthis - This library can be used to track USPS and UPS shipments.

Trackthis - This library can be used to track USPS and UPS shipments. It has the option of returning the raw API response, or optionally, it can be used to standardize the USPS and UPS responses so t

Aaron Guzman 0 Mar 29, 2022
Python Service for MISP Feed Management

Python Service for MISP Feed Management This set of scripts is designed to offer better reliability and more control over the fetching of feeds into M

Chris 7 Aug 24, 2022
It was created to conveniently respond to events such as donation, follow, and hosting using the Alert Box provided by twip to streamers

This library is not an official library of twip. It was created to conveniently respond to events such as donation, follow, and hosting using the Alert Box provided by twip to streamers.

junah201 8 Nov 19, 2022
A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz

A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz has some issues building with python 3.10

4 Jan 01, 2022
디텍션 유틸 모음

Object detection utils 유틸모음 설명 링크 convert convert 관련코드 https://github.com/AI-infinyx/ob_utils/tree/main/convert crawl 구글, 네이버, 빙 등 크롤링 관련 https://gith

codetest 41 Jan 22, 2021
Some ideas and tools to develop Python 3.8 plugins for GIMP 2.99.4

gimp-python-development Some ideas and tools to develop Python 3.8 plugins for GIMP 2.99.4. GIMP 2.99.4 is the latest unstable pre-release of GIMP 3.

Ismael Benito 53 Sep 25, 2022
Um pequeno painel de consulta

Spynel Um pequeno painel com consultas de: IP CEP PLACA CNPJ OBS: caso execute o script pelo termux, recomendo que use o da F-Droid por ser mais atual

Spyware 12 Oct 25, 2022
Repository for DNN training, theory to practice, part of the Large Scale Machine Learning class at Mines Paritech

DNN Training, from theory to practice This repository is complementary to the deep learning training lesson given to les Mines ParisTech on the 11th o

Alexandre Défossez 6 Nov 14, 2022
A python script to simplify recompiling, signing and installing reverse engineered android apps.

urszi.py A python script to simplify the Uninstall Recompile Sign Zipalign Install cycle when reverse engineering Android applications. It checks if d

Ahmed Harmouche 4 Jun 24, 2022
Gunakan Dengan Bijak!!

YMBF Made with ❤️ by ikiwzXD_ menu Results notice me: if you get cp results, save 3/7 days then log in. Install script on Termux $ pkg update && pkg u

Ikiwz 0 Jul 11, 2022
A ULauncher/Albert extension that supports currency, units and date time conversion, as well as a calculator that supports complex numbers and functions.

Ulauncher/Albert Calculate Anything Ulauncher/Albert Calculate Anything is an extension for Ulauncher and Albert to calculate things like currency, ti

tchar 67 Jan 01, 2023
Capture screen and download off Roku based devices

rokuview Capture screen and download off Roku based devices Tested on Hisense TV with Roku OS built-in No guarantee this will work with all Roku model

3 May 27, 2021
Automatically unpin old messages so you can always pin more!

PinRotate Automatically unpin old messages so you can always pin more! Installation You will need to install poetry to run this bot locally for develo

3 Sep 18, 2022
Wordless - the #1 app for helping you cheat at Wordle, which is sure to make you popular at parties

Wordless Wordless is the #1 app for helping you cheat at Wordle, which is sure t

James Kirk 7 Feb 04, 2022