The fancy word for that is Vertical Slice Architecture btw and it's the only way for complex apps that doesn't end in chaos.
@attr.s
class C:
x = attr.ib()
as its main api (with `attr.attrs` and `attr.attrib` as serious business aliases so you didn't have to use it).