What is a good practice to model Python properties in a UML class diagram?
Properties themselves are class objects, their getter and setter are class functions. From Outside the class they look like instance attributes. So, how would you suggest to present that in my class diagram?
It really depends what kind of template your UML tool uses. In some tools there is a Properties box along the common Attributes and Methods boxes. The UML notation states that attributes are written in lower camelcase, you could write properties in upper camelcase. They would also differ visually because of the public access modifier (+).
Do you have the need to specify different access modifiers for the getter and setter? Im not sure how i would go about that. Keep in mind the level of abstraction necessary.
Remember that UML is mainly a set of defined standards. If the standard needs a slight tweak to fit your needs dont hesitate. The important thing is that your team and stakeholders understand the syntax.
How to model python properties in UML diagram