goedelescherbach

The Leading Python Class Definition Systems

I have been surveying Python class definition systems for awhile and yesterday I watched a webcast of Param and was very impressed. Param is the bottom floor of a very impressive data science / web application development stack that has 100% support from Anaconda. Param was developed for over 10 years in academia.

What other powerful object systems are there besides Param? Pydantic

Pydantic is quite popular but lacks the reactive capabilities that Param, Atom, Traits and Traitlets have. It also is more about type conversion than validation (according to yesterday’s webinar). There is quite a bit of tooling around Pydantic in the form of Pydantic settings (for configuring apps), Pydantic-CLI (and Typer) for command-line interfaces, and Pydantic-SQLAlchemy to make using SQLAlchemy even easier. And FastAPI appears to use it under the hood. And FastAPI is the 3rd most popular web framework in Python behind Django and Flask.

So while numerous object systems are more featureful than Pydantic, another one is much faster

runtypes.

Final Mention for now – CubicWeb

CubicWeb is another object system that comes with a massive infrastructure around it. Even though you define classes similar to these other libraries, are you actually creating a UML relational structure which pumps out CRUD apps and has been doing so for over a decade!

Want to learn to Program in Python? Why not have a whole lot of fun while doing it!

My reddit post on learning Python by implementing computer games has over 300 upvotes! I do agree that programming should be fun and that learning from games is way more fun that a dry textbook. Of course, later you would want to learn from these legendary text:

  • Structure and Interpretation of Computer Programs – Python implementation of examples

the MIT book that replaced the legendary SICP (even though that has been re-implemented in Python). And the also Algorithms in Python will help you pass all those starchy, stiff job candidate tests.