Reduce LLM Costs: Token Optimization Strategies
Cut LLM costs by 80% with smart token optimization
Token optimization is the critical skill separating cost-effective LLM applications from budget-draining experiments.
Cut LLM costs by 80% with smart token optimization
Token optimization is the critical skill separating cost-effective LLM applications from budget-draining experiments.
Event-driven architecture with AWS Kinesis for scale
AWS Kinesis has become a cornerstone for building modern event-driven microservices architectures, enabling real-time data processing at scale with minimal operational overhead.
Python testing with pytest, TDD, mocking, and coverage
Unit testing ensures your Python code works correctly and continues to work as your project evolves. This comprehensive guide covers everything you need to know about unit testing in Python, from basic concepts to advanced techniques.
Build MCP servers for AI assistants with Python examples
The Model Context Protocol (MCP) is revolutionizing how AI assistants interact with external data sources and tools. In this guide, we’ll explore how to build MCP servers in Python, with examples focused on web search and scraping capabilities.
Python for converting HTML to clean, LLM-ready Markdown
Converting HTML to Markdown is a fundamental task in modern development workflows, particularly when preparing web content for Large Language Models (LLMs), documentation systems, or static site generators like Hugo.
Create consistent, portable, and reproducible development environments using Dev Containers
Developers often face the “works on my machine” dilemma due to dependency mismatches, tool versions, or OS differences. Dev Containers in Visual Studio Code (VS Code) solve this elegantly — by letting you develop inside a containerized environment configured specifically for your project.
Step-by-step example
Here we have a Python Lambda example of SQS Message Processor + REST API with API Key Protection + Terraform script to deploy it for serverless execution.
+ Specific Examples Using Thinking LLMs
In this post, we’ll explore two ways to connect your Python application to Ollama: 1. Via HTTP REST API; 2. Via the official Ollama Python library.
Slightly different APIs require special approach.
Here’s a side-by-side support comparison of structured output (getting reliable JSON back) across popular LLM providers, plus minimal Python examples
A couple of ways to get structured output from Ollama
Large Language Models (LLMs) are powerful, but in production we rarely want free-form paragraphs. Instead, we want predictable data: attributes, facts, or structured objects you can feed into an app. That’s LLM Structured Output.
Using pandoc, python, or online tools for convertion to MD
Converting Word documents to Markdown format is a very common task for technical writers, developers, and content creators who want to move their content to platforms with Markdown (like GitHub, GitLab, static site generators like Hugo).
And deploying new Telegram bot to AWS
Here are my notes with step-by-step tutorial on how to implement and deploy to AWS a Telegram bot. I’ve added a quick start (long polling) and a production-ready path (webhooks), with examples in Python and Node.js.
Nice tool for platform engineering on AWS
The AWS Cloud Development Kit (AWS CDK) is a framework that enables you to define and provision cloud infrastructure using familiar programming languages like TypeScript, Python, Java and Go.
Nice framework for ETS/MLOPS with Python
Apache Airflow is an open-source platform designed to programmatically author, schedule, and monitor workflows, - entirely in Python code, offering a flexible and powerful alternative to traditional, manual, or UI-based workflow tools.
Good things about Python uv
Python uv (pronounced “you-vee”) is a modern, high-performance Python package and project manager written in Rust. It is designed as a drop-in replacement for traditional Python package management tools such as pip, pip-tools, virtualenv, pipx, and pyenv, aiming to simplify and accelerate Python development workflows
My favorite lib is pdf-reports
Generating PDF Reports Using Python
Python, with its extensive libraries and modules, offers powerful tools for generating professional PDF reports. This guide explores various methods to create PDF documents using Python, covering popular libraries like ReportLab, FPDF, Xhtml2pdf, WeasyPrint, Jinja2, pdf-reports and PdfKit.