Conventions
Package-wide conventions I prefer.
Naming
Ctx Managers:
{}_ctx.Enums:
{}_e.Flags:
{}_f.Hooks:
{}_h.Interfaces:
{}_i.Loggers:
{}_l.Mixins:
{}_m.Protocols:
{}_p.Slot-based Data:
{}_d.Specs:
{}_c.Structs:
{}_s.utilnotutils.
Package Structure
Top Level Package Structure. Note the in-tree rst documentation.
<package>/
├── __init__.py
├── py.typed
├── index.rst
├── _abstract/
├── _docs/
└── conf.py
└── _static/
└── _templates/
├── <module>/
Module Structure
Module structure is similar to top level package structure.
Interfaces, protocols, simple data structures etc go into the _interface.py file.
<module>/
├── __init__.py
├── _interface_.py
├── index.rst
└── __tests/
└── __init__.py
└── test_{class}.py
└── __examples/