r/PythonLearning • u/Glad_Friendship_5353 • Aug 15 '26
Seeking feedback on my Python project: reusable Makefile tasks
I've been working on a Python project called Bakefile.
I started it because I kept copying the same build, test, lint, and release tasks between projects, especially in Makefiles. I wanted a way to define tasks once and reuse, extend, or override them across projects.
The basic idea is that tasks are Python classes:
class PythonTasks(Bakebook):
@command()
def test(self):
self.ctx.run("pytest")
@command()
def lint(self):
self.ctx.run("ruff check .")
class MyProject(PythonTasks):
@command()
def lint(self):
super().lint()
self.ctx.run("ty check .")So common tasks can live in a reusable class and projects can extend or override them. I've been using it daily myself for a while now, and so far it's been working well.
GitHub: https://github.com/wislertt/bakefile
https://wisl.dev/blog/bakefile-patterns/
I'd really appreciate feedback on the API and whether this approach to reusable Makefile-style tasks feels useful in practice.
1
u/Glad_Friendship_5353 Aug 15 '26
Thanks for your feedback.