Mo

Modguard – a lightweight Python tool for enforcing modular design

Hacker News

Modguard – a lightweight Python tool for enforcing modular design

Hi HN! We are excited to show you modguard - a Python tool we built to enforce a modular, decoupled package architecture. We built modguard to solve a recurring problem that we've experienced on software teams - code sprawl. Over time, cross-module imports would tightly couple together what used to be independent domains, and eventually create "balls of mud". This made it harder to test, and harder to make changes. Mis-use of modules which were intended to be private would then degrade performance and even cause security incidents. This would happen for a variety of reasons: - Junior developers had a limited understanding of the existing architecture and/or frameworks being used - It's significantly easier to add to an existing service than to create a new one - Python doesn't stop you from importing any code living anywhere - When changes are in a 'gray area', social desire to not block others would let changes through code review - External deadlines and management pressure would result in "doing it properly" getting punted and/or never done Attempts to fix this problem always came up short. Inevitably, standards guides would be written, and stricter attempts would be made to enforce those guides. Teams would lead developer education efforts, and restrict code review. These approaches each had their own flaws, and didn't scale. The solution is to explicitly define a module's boundary and public interface in code, and enforce those domain boundaries through CI. This means that introducing a new cross-module dependency required explicitly changing the public interface or the boundary itself. This is a significantly smaller and well-scoped set of changes that can be maintained and managed by those who understood the intended design of the system. modguard is: - fully open source - able to be adopted incrementally - implemented with no runtime footprint - a standalone library with no external dependencies - interoperable with your existing system (cli, generated config) We hope you try it out! We’d love your feedback. Github - https://github.com/Never-Over/modguard Docs - https://never-over.github.io/modguard/ admin@0x63problems.dev

Share card

Actual performance

10points
7comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: new, code, open · Missing: mac, agents, macos
86%86% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
74%74% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: excited, exist, open source · Missing: https docs, just released, lua
72%72% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Strong signals: interface · Missing: plus, platform, intuitive
43%43% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: way, education · Missing: mobile apps, ios, personal
40%40% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: recurring · Missing: arr, mrr, revenue
14%14% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ta
Tach – a Python tool to enforce modular design, inspired by nx67%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Tach – a Python tool to enforce modular design, inspired by nx

Hacker News4
Ko
Koara – A modular lightweight markup language61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Koara – A modular lightweight markup language

Hacker News4
Mo
Modguard – Enforce modular Python automatically72%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Modguard – Enforce modular Python automatically

Hacker News3
Ic
Iceberg – Graphic Design and Diagramming in Python63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Iceberg – Graphic Design and Diagramming in Python

Hacker News19
FP
FPGA design acceleration – idiomatic Python to synthesizable Verilog44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

FPGA design acceleration – idiomatic Python to synthesizable Verilog

Hacker News2
Ma
Matroschka – A Python steganography tool54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Matroschka – A Python steganography tool

Hacker News69
To
Tool for pinpointing circular imports in Python54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Tool for pinpointing circular imports in Python

Hacker News1
(C
(Crocs) Regex and Backus-Naur on Python classes. A parsing tool38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

(Crocs) Regex and Backus-Naur on Python classes. A parsing tool

Hacker News2
Py
PyInpaint, a lightweight image inpainting tool written in Python48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PyInpaint, a lightweight image inpainting tool written in Python

Hacker News20
Bi
Binder - a lightweight SQL mapper for Python64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Binder - a lightweight SQL mapper for Python

Hacker News1