Easily kick-start your python project with very opinionated best practices.

Pyproject

Easily kickstart your Python project with very opionionated best practices.

  • Manage your project using poetry https://python-poetry.org/
  • Add testing with pytest and pytest-cov
  • Run checks before commiting using pre-commit
  • Code analysis and formatting with Flake8, Mypy, Isort and Black

This is based on this excellant article: Python Best Practices for a New Project and some of my own experiance.

Installation

⚠️ Warning: Poetry must be installed.

go install

If you have go installed, simply run:

go install github.com/luciferchase/pyproject

Binaries

Binaries for Windows are available in the Release page.
You have to manually add the pyproject.exe file to your path.

Build from source

git clone this repository and run:

go build -o bin\pyproject.exe main.go

You have to manually add the pyproject.exe [availabe in the .\bin dir] to your path.

Why?

Well, dependency management and static typing in Python is a hot mess. To avoid this, we use various tools like poetry, pytest, flake8, mypy, black and so many more.

Thus to fast track starting a new Python project, I wrote this for myself.

Owner
Lucifer Chase
Just another 17-year-old boy who likes to mess around with computers and play basketball.
Lucifer Chase
Similar Resources

At this example project, I'm trying to learn Golang with Clean structure and come up with a reusable

Learning Golang Language In Clean Structure At this example project, I'm trying to learn Golang with Clean structure and come up with a reusable, nice

Sep 25, 2022

Learn-Nakama - An example project template on how to set up and write custom logic in Nakama server

Nakama Project Template An example project template on how to set up and write c

Apr 18, 2022

Golang tutorials - a self-project to learn Go.

Golang tutorials - a self-project to learn Go.

Golang Tutorials a self-project to learn Go. prod by blvnk. Tech With Tim Tutorials Intro to Go created a Hello World program. compiled a Hello World

Feb 21, 2022

This project is a GO Restful API service with Gin framework and Gorm SQLite with authorization

GO Restful API service with Gin framework and Gorm SQLite Template Structure Gin is a web framework written in Go (Golang). It features a martini-like

Oct 24, 2022

The Babylon project is a re-creation of my original PBX network integration tools from the early 1990's, in go.

What is Babylon? The Babylon project is a re-creation of many of my original PBX network integration tools from the early 1990's, in go. Many of these

Jan 23, 2022

Turtorial - A Hard Fork Of Icexin's Great Gocraft Project Aimed At Learning Basic Programming Tasks Through Turtles

Turtorial - A Hard Fork Of Icexin's Great Gocraft Project Aimed At Learning Basic Programming Tasks Through Turtles

TURTORIAL A voxel sandbox-survival game aimed at teaching the basics of programm

Jan 25, 2022

💯 Materials to help you rock your next coding interview

Tech Interview Handbook Credits: Illustration by @leftaligned Read on the website Black Lives Matter. Support the Equal Justice Initiative What is thi

Jan 4, 2023

Assert your Go code is inlined and bounds-check eliminated

gcassert gcassert is a program for making assertions about compiler decisions in Golang programs, via inline comment directives like //gcassert:inline

Oct 27, 2022

Cook amazing genetic parts using our cookbook. Recipes and synthetic biology tools to take your breath away.

friendzymes-cookbook Friendly tools for a friendly community. A collection of tutorials and genetic tools for synthetic biology. This cookbook is a su

Aug 19, 2022
Comments
  • Error while initializing project

    Error while initializing project

    I'm trying your code for curiosity and when I run the init command, the processus stop at pre-commit step :

    2022/01/23 15:22:55 initializing project...
    2022/01/23 15:23:00 ✅ successfully initialized project
    2022/01/23 15:23:00 adding dependencies may take a while...
    2022/01/23 15:23:45 ✔️ successfully added dependency: black
    2022/01/23 15:24:07 ✔️ successfully added dependency: flake8
    2022/01/23 15:24:23 ✔️ successfully added dependency: isort
    2022/01/23 15:24:44 ✔️ successfully added dependency: mypy
    2022/01/23 15:25:53 ✔️ successfully added dependency: pre-commit
    2022/01/23 15:26:22 ✔️ successfully added dependency: pytest-cov
    2022/01/23 15:26:22 ✅ all dependencies added successfully
    2022/01/23 15:26:22 ✅ config files added successfully
    2022/01/23 15:26:22 initializing git...
    2022/01/23 15:26:22 ✅ git initialized successfully
    2022/01/23 15:26:22 initializing git pre-commit hook...
    2022/01/23 15:26:35 ⚠️ poetry pre-commit autoupdate failed
    

    If I check the content of the new project created by your script, there is no file name .pre-commit-config.yaml

    /go/pyproject/new_project # ls .pre*
    ls: .pre*: No such file or directory
    /go/pyproject/new_project # ls pre*
    -rw-r--r--    1 root     root         866 Jan 23 15:36 pre-commit-config.yaml
    
    /go/pyproject/new_project # pre-commit run --all-files
    An error has occurred: InvalidConfigError:
    =====> .pre-commit-config.yaml is not a file
    
A cookbook with the best practices to working with kubernetes.
A cookbook with the best practices to working with kubernetes.

A cookbook with the best practices to working with kubernetes.

Dec 27, 2022
Go programming language secure coding practices guide

You can download this book in the following formats: PDF, Mobi and ePub. Introduction Go Language - Web Application Secure Coding Practices is a guide

Jan 9, 2023
This is my first golang project. The main reason for its existence is the need for practice. I will be studying golang while writing this project

My first GoLang project Project Aim The goal of this project is to develop the most simple golang bot to learn how to work with this programming langu

Jan 7, 2022
Go-beginners-guide-project - golang beginners project from tutorialedge.net

Go Beginner's Project Running Locally If you want to run this application locally then run the following commands: $ go run cmd/cli/main.go Build Appl

Jan 2, 2022
This project is a collection of many of the basic tools used on Unix-like operating systems implemented in Go as a learning exercize.

GoUnix This project is a collection of many of the basic tools used on Unix-like operating systems implemented in Go as a learning exercize. The idea

Jul 21, 2022
Go-Notebook is inspired by Jupyter Project (link) in order to document Golang code.
Go-Notebook is inspired by Jupyter Project (link) in order to document Golang code.

Go-Notebook Go-Notebook is an app that was developed using go-echo-live-view framework, developed also by us. GitHub repository is here. For this proj

Jan 9, 2023
The purpose of this project is to learn about go-swagger.

learn-go-swagger The purpose of this project is to learn about go-swagger. Requirements Go go-swagger Setup Run ./scripts/gen-swagger to generate swag

Nov 20, 2021
Questions and answers example project.

Question Answer Service REST Service for questions and answers Database modeling Directory tree pkg: Here is the main source code. sql: Here are all t

Dec 17, 2021
Exercise project written in Go that I did on my own during the course "gRPC [Golang] Master Class: Build Modern API & Microservices" taught by Stephane Maarek on Udemy

calculator Exercise project written in Go that I did on my own during the course "gRPC [Golang] Master Class: Build Modern API & Microservices" taught

Nov 9, 2022
Walkthrough of Course Project

CourseProj1660Final Walkthrough of How I Complete Project Option 1 for 1660 Build Main App I built the main application by altering the example applic

Nov 29, 2021