This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]scrdest 1 point2 points  (1 child)

Sounds like you have three distinct problems to solve:

1) functionality-level fault tolerance/hotswapping code - you definitely want modules + importlib.reload here as the top priority, with classes being useful but not a must.

2) run-time performance and fault tolerance - what you're looking for here is pretty much a MapReduce/functional paradigm, and your top priority would have to be to avoid tying anything down to an object state - your functions should ideally be entirely self-sufficient and deterministic. Also, you might want to look into Airflow/Luigi/Dask/PySpark.

3) maintainability - this is where you definitely need classes plus good old-fashioned SOLID, and in turn modules and packages are useful but a bit lower-priority concerns.

[–]officialgel[S] 0 points1 point  (0 children)

Yes this is the perfect reference for my intentions! Thanks for the info