All Questions
Tagged with pythonobject-oriented
7 questions with no upvoted or accepted answers
2votes
0answers
476views
Extensible / Plugin Architecture in Python - overwriting methods deep in the inheritance tree?
Current situation I'm developing a test-framework in python for end-to-end tests for a large ERP application. The AUT (application under test = ERP system) is structured in modules and provides a lot ...
0votes
1answer
258views
Separation of concerns between business layer, data layer and presentation layer without losing information
I'm developing an api in Fast API using sqlalchemy to manage my ORM classes and operations with the database. I'm dealing with some design decisions to have my classes as little coupled as possible ...
0votes
1answer
849views
Abstract base classes and mix-ins in python
In the python docs, I read this about the ABC (abstract base class) meta class: Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. I don't come ...
0votes
0answers
118views
"Best practice" or "design pattern" to group a class with "associated" classes in an object-oriented language
Sometimes a class A can have an "associated" class B such that the implementation of B depends on the implementation of A. For example, this can happen when B's objects are to be created by A's ...
-1votes
1answer
164views
How would you design the abstraction/class(es)/component(s) of a third-party service/api used in your application?
Lets say you were designing a Twitter client for people with people could see tweets and post tweets? How would you design the twitter api abstraction? Many of the api wrappers I've seen feature an ...
-1votes
1answer
585views
How to write a loose Python interface where subclasses can add extra data?
Here are two object makers I made: def make_assassination(i): neighbors = [] def test(graph): for n in graph.neighbors(i): neighbors.append(n) ...
-4votes
1answer
116views
Dynamically assign attributes to objects from outside
In python the following code works perfectly fine. class Table: pass table = Table() table.fruits = ["apple", "orange"] But as soon as we check it out with some kind of ...