Skip to main content

All Questions

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 ...
Frieder's user avatar
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 ...
Alejo Villores's user avatar
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 ...
henryn's user avatar
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 ...
Alexey's user avatar
-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 ...
an_aspiring_engineer's user avatar
-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) ...
djechlin's user avatar
-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 ...
Kasia's user avatar

close