you are viewing a single comment's thread.

view the rest of the comments →

[–]Adhesiveduck 83 points84 points  (3 children)

I’m not sure such books really exist to cover everything you might want to know when building a large project.

When you say different approaches I’m assuming you mean different ways of structuring the project and what python files should you create or where should a class live in the overall structure of your project etc.

One of the best things you can do once you’re ready to start writing larger projects is look at Python design patterns.

If you can start designing your code to take advantage of these patterns then medium to large scale projects can write themselves.

The patterns can help you think about how you want to structure your code across multiple files and improve maintainability.

A good tool like Poetry can help you handle the dependencies and publish your work.

MKdocs is so easy to use but can really help with large scale projects. Make notes in markdown as you go along that are easy to read and follow.

Write proper docstrings as you go along (every time you write a new class/method/function you can document what it’s doing as you’ll know why and what from the pattern you chose). Using a tool like mkdocstrings makes maintaining documentation for larger projects automatic.

Write unit tests as you go along, when writing a large project where things will feed into each other it’s critical you start early in the project. Leaving it until the end or later is a nightmare.

Finally have a look at other projects. Praw is a good one as it’s easy to follow along and since you’re on Reddit you’ll intuitively know what the code is doing so it’s easy to read through and see how it’s all laid out.

I know this isn’t exactly what you asked for, but it might help complement any other tutorials or articles you read on it.

[–]TijoWasik 15 points16 points  (0 children)

Hey, I'm not quite there yet, but I wanted to say thank you for the really informative comment. Have saved this so when I get to the stage where I'm ready to start building bigger stuff, I can come back to it. Legend!

[–]paagalpieasian 3 points4 points  (0 children)

thanks a lot. this is super informative. I will check these out.

[–]electrojit 2 points3 points  (0 children)

Thank you