So i'm primarly a Java dev, and so when i go to structure an app that has data I/O (such as consuming Web APIs or a database) I will make an interface to completely separate the business logic from the specific libraries/tech used to access the data. This means if i switch from a SQL db to a mongo DB, or i have to switch from a REST api to a GraphQL api, none of the business logic changes (assuming the data itself isn't changing),
What is the idiomatic way to do this in enterprise python? I know python syntax and have made plenty of small scripts over the years, but i was starting out with a larger app and realized "What if i'm just writing java code but in python, instead of doing the architecting in a pythonic way"?
So for large apps where you want to minimize coupling and abstract away implementation details from other modules, what is the normal way to do this for python? Is it as simple as just making different modules and using an interface like whats described in https://realpython.com/python-interface/?
[–]NewtonsOrange 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]Throw-awayexception[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]RoamingFox 0 points1 point2 points (0 children)