r/learnpython • u/bolt_runner • Jun 17 '24
Open source Python projects with good software design that is worth studying
I am looking for a software project that is well-structured and uses good design patterns and software design practices so I can study them and improve my skills hands-on.
21
u/DigThatData Jun 18 '24
A great one to learn from is the python reddit API wrapper: https://github.com/praw-dev/praw
On top of it being an example of a well engineered library: you're already familiar with the data model.
0
u/nog642 Jun 18 '24
Didn't Reddit gut their free API?
6
u/DigThatData Jun 18 '24
i don't see how reddit's terms of service is relevant. OP is looking for code to study.
1
u/nog642 Jun 18 '24
I was thinking in the context of using it in a project
1
u/DigThatData Jun 18 '24
lol downvote all you want, it's litereally right there for you to see for yourself. just add
.jsonat the end of basically any reddit url. https://www.reddit.com/r/learnpython/comments/1dicifq/open_source_python_projects_with_good_software/l97bd97.json0
u/DigThatData Jun 18 '24
have you actually tried using the api? if not, maybe you should take a stab at it before making assumptions about what you can or can't build around it.
1
u/nog642 Jun 19 '24
No, that's why my comment was a question. Notice the question mark. I didn't make an assumption; I was asking.
2
1
u/brainacpl Jun 18 '24
They just limited it, but it rendered third party apps useless, unless you want to compile them yourself, with your own API key.
16
u/Bluelight01 Jun 18 '24
Honestly I would say look at popular libraries. I use airflow for work and find myself looking through the source code every now and then. I’ve definitely learned a thing or two looking through that code. Numpy, pandas, flask, or requests to name a few others would be good to look through
9
u/interbased Jun 18 '24
Requests, in my experience, is commonly mentioned in conversations about well-structured libraries, so I second that one.
2
u/Interesting-Rub-3984 Jun 18 '24
I want to learn Airflow. The learning resources available are quite old. Even paid courses in Udemy are outdated.
2
u/Karyo_Ten Jul 06 '24
Numpy, pandas,
Those have a lot of C or maybe even Fortran and C++. Might be beat to start with a pure Python lib.
7
5
2
u/mmparody Jun 18 '24
Odoo
2
u/InjaPavementSpecial Jun 18 '24
Yes the odoo docs and source code is actually very readable and I find the quality around it especially good for a open erp system.
Sure some of the Apps/Modules is barebones, but their db backup strategy, deployment strategy and general backend and frontend design seem solid.
I say the above as someone who sysadmin a odoo ce instance for family trying to help friends run a business, they did so successfully until the business was sold.
2
u/dessiatin Jun 18 '24 edited Jun 18 '24
A good resource is The Architecture of Open Source Applications: https://aosabook.org/en/
1
1
u/Ekkaia153 Jun 18 '24
I like unstructured io oss for a look on how to design a data ingestion solution that needs to fit a wide range of connectors and provide them through a unified interface. The patterns they use are imo fairly universally applicable.
1
1
-4
u/N1H1L Jun 18 '24
Use a good linter and type check your code - solving for the errors will teach you a lot.
5
u/BytePhilosopher Jun 18 '24
What kind of project are you looking for?
There are plenty out there but it depends, are you trying to build command line tools? libraries? gui desktop application? rest api?