PyWeb-IL #110 - November 2024

Date: 2024.11.27
Location: Infinidat Akerstein Tower A 9 Hamenofim Street, Herzeliya Pituach.
Part of PyWeb
register

Schedule

18:00 Meeting and mingling (30 min)

Welcome to Infinidat by Asaf Brom
Language: Hebrew
Length: 20 min

Advanced Python OO by Miki Tebeka
Language: Hebrew
Length: 45 min

In this talk we'll explore the more advanced Object Oriented features of Python. We'll talk about:

  • Attribute access and how you can change it
  • __slots__
  • Name mangling
  • static and class methods
  • Abstract base classes (abc and collections.abc)
  • Speical methods such as __len__, __getitem__, __iter__ and others
  • Metaclasses

You can see the source code for this talk here.


boto-model by Ori Poria
Language: Hebrew
Length: 5 min
  • https://pypi.org/project/boto-model-py
  • https://github.com/OriPoria/boto-model-py

REPL-Driven Development – Adapting Lisp-style interactive development in Python by Maor Kadosh
Language: Hebrew
Length: 15 min

A common style of development in Lisps and Lisp-likes is writing code along a running stateful Lisp machine process, and evaluating bits of code every time a change is made. In practice, I find it most useful when authoring scripts, and the workflow looks like this:

  1. I load up some data; be it from a database or a remote site.
  2. I'm not entirely sure how I use the data to achieve the goal of the script, so I start wrangling with it interactively, exploring its methods and nested fields.
  3. I write some functions in my editor, evaluate them in the running IPython process (which holds the state, e.i. the data I fetched), and pass the data from the process' memory to the function I just evaluated.
  4. Inspect the result, rewrite the function, inspect the data in memory some more, and so on

This isn't groundbreaking, and can be achieved with TDD as well (or just temporarily storing fetched data in a file). I just personally like this approach as it is very low friction. I have written about this two years ago. Not a whole lot has changed: Attempting REPL-Driven Development in Python

I'm Maor Kadosh, I'm a relatively new DevOps person – been a Sysadmin at the military, working at the industry for two years. I have a soft spot for Python and scripting in general. Spare time is spent on both redundant hacking and fruitful hacking – and also making some music:) Website


Python Profiling Made Easy by Christina Beletskaya
Language: Hebrew
Length: 20 min

In this session, we'll delve into the world of Python profiling, covering timeit, cPofile and snakeviz. We'll explore how to leverage these tools to optimize our programs and make them run smoother and see practical examples.

Agenda:

  • What is Profiling?
    • Time and execution profiling ⌛️
    • Profiling tools 🛠️
    • Profiling with cProfile module 🕵️
    • Interpreting profiling results with snakeviz 🐍
    • Optimizing code with profiling insights 👩 💻
  • Real life example 😲
  • Conclusion
  • Profiling in runtime 🏃 ♀️

About Christina Beletskaya

Im Christina Beletskaya, a fullstack engineer working as a freelancer for almost 2 years now. I love learning new things and passionate about sharing knowledge with others.


register