Developer | πŸ“š Mastering Python Design Patterns, 3rd Edition πŸ‘‰ packtpub.com | Building Together skool.com/onboard-or-join-a-…

Joined May 2007
239 Photos and videos
Pinned Tweet
After months of work, I'm thrilled to announce the release of the new edition of "Mastering Python Design Patterns"! What's new? This edition dives deep into creational, structural, behavioral, and architectural patterns, plus it introduces concurrency, asynchronous, and performance patterns. What you’ll learn: πŸ‘‰ Master key design principles and SOLID concepts πŸ‘‰ Implement Gang of Four (GoF) patterns in Python πŸ‘‰ Use architectural patterns to build robust systems πŸ‘‰ Optimize code with concurrency and performance patterns πŸ‘‰ Scale applications with distributed systems patterns πŸ‘‰ Ensure reliability with testing patterns πŸ‘‰ Build modular, decoupled systems and manage dependencies efficiently Stay tuned for more updates! πŸ“˜βœ¨ #Python #Coding #DesignPatterns
1
1
400
Shipped the first version of the UX for my LLM β†’ Structured Data Connector. Next work involves advanced ways of providing the data schema input (JSON, CSV).
Replying to @kamon
Day 9 slice shipped: Minimal UX with Gradio βœ… To test: - Install/update dependencies in your virtual environment. - Run: python app.py - Visit http://127.0.0.1:7860 Currently, you can generate the result by providing the prompt and the list of columns. Repo: github.com/TeamEnable/poc_ll… Branch: ux-with-gradio Next up: Ability to specify the schema of the data returned by providing a JSON string or a "template" CSV. Do you see another option?
1
52
As a dev / builder, I needed a fresh approach to things. I started a build-in-public sprint: 6 ideas tested β†’ picked the "LLM β†’ Structured Data Connector" idea today. I’ll post daily progress a Day-14 demo. I’m sharing raw notes inside my Skoolβ€”DM if you want in.
1
60
Day 8 slice shipped: CLI for prompt and other input β†’ file out βœ… It is possible to test with: python main.py "Produce the list of currencies with the countries" --col "currency_name" --col "ticker" --col "country" --rows 20 --output "out/currencies.csv" It does some validation of the data after parsing the response, and then writes the file. Repo: github.com/TeamEnable/poc_ll… Branch: cli-with-typer My current thinking is generating a CSV, and then make it possible to move the data from the CSV to other databases / formats / storages, using existing techniques/tools. What do you think?
1
1
84
Day 9 slice shipped: Minimal UX with Gradio βœ… To test: - Install/update dependencies in your virtual environment. - Run: python app.py - Visit http://127.0.0.1:7860 Currently, you can generate the result by providing the prompt and the list of columns. Repo: github.com/TeamEnable/poc_ll… Branch: ux-with-gradio Next up: Ability to specify the schema of the data returned by providing a JSON string or a "template" CSV. Do you see another option?
97
Shipped the CLI slice for my LLM β†’ Structured Data Connector. Currently, you can define the schema with --col. Note: The --col option might get adjusted. I may also add a preview of the data before writing. Next: Small UX (going to try Gradio first). Would you target the other output stores/formats (SQL, JSON) by using custom code in the package directly or would you delegate that to standard pipeline/ELT/ETL tools?
Replying to @kamon
Day 8 slice shipped: CLI for prompt and other input β†’ file out βœ… It is possible to test with: python main.py "Produce the list of currencies with the countries" --col "currency_name" --col "ticker" --col "country" --rows 20 --output "out/currencies.csv" It does some validation of the data after parsing the response, and then writes the file. Repo: github.com/TeamEnable/poc_ll… Branch: cli-with-typer My current thinking is generating a CSV, and then make it possible to move the data from the CSV to other databases / formats / storages, using existing techniques/tools. What do you think?
39
Kamon Ayeva 🐍 retweeted
7 Oct 2025
What's stopping you from using Linux?🐧
583
204
3,156
838,853
Been out of this account for more than a year, spending time elsewhere. Life happens and there is so much to do in this world 🌐 I am back with improved skills and new ideas. Let's reignite/continue the conversations.
18
The book has now been published!
Check out this new edition of Mastering Python Design Patterns by @kamon and @SKasampalis! Order from Amazon today: amazon.com/Mastering-Python-…
1
180
🐍 Python Tip of the Day: Utilizing Python’s β€œ-m” Option for Module Execution Python's `-m` option is a versatile tool that allows you to run library modules as scripts. This can be incredibly useful for executing modules that contain test code or need to perform initialization tasks. It runs the source file for a module located in the Python module search path. One common use of the `-m` option: Launch Python's built-in HTTP server, which can serve files from the current directory over HTTP. This is very useful for quick tests, sharing files, or local development work. ``` # Serve files from the current directory at http://localhost:8000/ python -m http.server ``` Another popular usage: Run the `pip` installer to ensure that you are using the module corresponding to the Python interpreter you're currently using: ``` # Upgrade the pip installer using the -m option python -m pip install --upgrade pip ``` Benefits: 1️⃣ Flexibility: Offers a straightforward way to execute Python modules from the command line, providing a flexible approach for various Python tasks. 2️⃣ Utility: Great for utility tasks like running a web server, profiling code, testing, or package management, all without additional scripts. 3️⃣ Safe imports: Ensures that the module is imported correctly, potentially avoiding shadowing issues that can occur when a module and a script have the same name.
1
132
Here are 9 useful Python decorators, from the standard library, that can enhance your productivity and help improve your codebase. πŸ“˜βœ¨πŸš€ 1️⃣ Using the `classmethod` decorator for state management x.com/kamon/status/178316270…

πŸš€ Python Tip of the Day: Utilizing the classmethod Decorator for State Management In object-oriented programming with Python, the `classmethod` decorator allows you to define methods bound to the class rather than its instances. This capability is crucial for managing state or behavior that is common to all instances of the class, rather than individual objects. When to Use It? 1️⃣ Managing shared state: Use it to manage data that is shared among all instances of a class. For example, keeping a count of all instances ever created. 2️⃣ Factory methods: Excellent for defining alternative constructors. You can create class methods that return instances of the class, configured in different ways. 3️⃣ Accessing class attributes: They provide a way to access or modify class state that applies across all instances, like modifying a configuration setting that affects all instances.
1
1
1
191
8️⃣ Simplifying resource management with the `contextlib.contextmanager` decorator x.com/kamon/status/179118481…

🐍 Python Tip of the Day: Simplifying Resource Management with `contextlib.contextmanager` Decorator Python's `contextlib.contextmanager` decorator is a handy tool for creating simple and readable context managers without the need for a class that implements `__enter__` and `__exit__` methods. This decorator is ideal for managing resources like files, network connections, or locks that need to be set up and cleaned up reliably, no matter what happens during their use. Example use case: Create a temporary file and ensure it gets deleted after use. Benefits: 1️⃣ Reduced boilerplate: Eliminates the need to write an entire class with `__enter__` and `__exit__` methods, reducing boilerplate and overhead. 2️⃣ Exception handling: Automatically handles exceptions within the `with` block, ensuring that the cleanup code is executed. 3️⃣ Flexibility in resource handling: Allows more flexible handling of how resources are passed to the block enclosed by the `with` statement.
1
104
9️⃣ Boosting efficiency with the `cached_property` decorator The `cached_property` decorator transforms a method into a property whose value is cached after the first access. So the method will only be executed once, and subsequent accesses retrieve the cached result, saving computation time and resources. Benefits: 1. Reduced load times: For web applications and data-heavy applications, this tool can lead to faster response times by caching frequently requested but rarely changed data. 2. Ease of maintenance: The caching logic is abstracted away by the decorator, making the code cleaner and easier to maintain. 3. Consistency: The cached value remains consistent between accesses, which is crucial for ensuring that repeated requests for the property return the same result, assuming no changes in the underlying data.
71