Hacker News new | ask | show | jobs
by nhgiang 1068 days ago
RealPython.com

Learn all about pytest and how to use its fixtures well.

Mypy for use in conjunction with type annotations for static analysis.

Packaging: Python-poetry.org

Personally, I recommend Deal (design by contract) and/or Hypothesis (property-based testing) libraries, too.

Controversial opinion: Stay away from Flask and all of its derivations. That framework is badly designed. Learn from Django instead.

2 comments

Another great course is David Beazley's Advanced Python Mastery; he just put it all up on github (PDF of all slides + exercises) https://github.com/dabeaz-course/python-mastery

It's designed as a four-day workshop. Lots of material around 'mature' Python code

> Stay away from Flask and all of its derivations. That framework is badly designed. Learn from Django instead.

I couldn’t of agree more. I’m a Python veteran, but hasn’t done web dev before a few years ago. I picked Flask for one of our web apps and now very much regret it. It feels like it fights a lot of the direction modern python is going. It’s also encumbered by an ecosystem of bloated and under-maintained extensions that only make it harder to use.

Regarding poetry for packaging, I’m 50/50 on it. The product is interesting, but I find myself almost always reverting to a structure where I have requirements managed by pip-compile. It just feels a lot cleaner. I also had a few unpleasant interactions with the poetry devs with regard of GitHub issues, which makes it easier to obviate on a personal level.