python-project-structure

Organize Python project structures with explicit __all__ interfaces and flat directories.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/leonardoteodoroo/amino-advanced --skill python-project-structure-leonardoteodoroo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-project-structure
Source: https://github.com/leonardoteodoroo/amino-advanced/tree/main/.agent/skills/python-project-structure
Command: npx skills add https://github.com/leonardoteodoroo/amino-advanced --skill python-project-structure-leonardoteodoroo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill clarifies Python project organization by defining module boundaries, promoting explicit public interfaces with all, and guiding maintainable directory layouts.

Core Features & Use Cases

  • Module cohesion and explicit interfaces with all for public APIs.
  • Guidance on when to prefer flat versus nested directory structures and how to place tests.
  • Use Case: Starting a new Python project, refactoring an existing codebase, and designing scalable package boundaries.

Quick Start

Organize your next Python project by defining modules, public interfaces with all, and a simple flat directory structure.

Frequently Asked Questions about python-project-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Python project to avoid deep nesting?

Structure a Python project using a lightweight, flat directory pattern to reduce deep nesting. This approach organizes module boundaries and ensures maintainable directory layouts by keeping packages simple and cohesive.

What is the best way to define a public API in Python modules?

Defining a public API in Python modules is best achieved using the __all__ interface. Explicit __all__ declarations clarify module boundaries and expose only intended functions, streamlining API design and maintenance.

Where should I place tests when organizing a Python project?

Test placement in a Python project should follow a clear strategy defined during structural organization. Proper test placement ensures module boundaries remain clean and supports maintainable directory layouts.

When do I need to refactor Python module boundaries?

Refactoring Python module boundaries is needed when module cohesion decreases or APIs become unclear. Reorganizing boundaries and applying explicit __all__ interfaces restores maintainability and ensures scalable package design.

Can I use a flat directory structure for large Python applications?

A flat directory structure suits Python applications when guided by module cohesion principles. It reduces deep nesting and streamlines maintenance, though boundaries must be carefully managed to scale effectively.