<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on Ghafoor's Personal Blog</title><link>http://ghafoorsblog.com/categories/python/</link><description>Recent content in Python on Ghafoor's Personal Blog</description><generator>Hugo</generator><language>en</language><managingEditor>noreply@example.com (AG Sayyed)</managingEditor><webMaster>noreply@example.com (AG Sayyed)</webMaster><copyright>Copyright © 2024-2026 AG Sayyed. All Rights Reserved.</copyright><lastBuildDate>Sat, 16 May 2026 17:42:12 +0100</lastBuildDate><atom:link href="http://ghafoorsblog.com/categories/python/index.xml" rel="self" type="application/rss+xml"/><item><title>Python with Flask for Large-Scale Projects</title><link>http://ghafoorsblog.com/courses/ibm/rag-agentic-ai-content/rag-agentic-ai-pcert/01-develop-genai-apps/03-module/004-python-with-flask/</link><pubDate>Fri, 21 Nov 2025 18:40:32 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/rag-agentic-ai-content/rag-agentic-ai-pcert/01-develop-genai-apps/03-module/004-python-with-flask/</guid><description>&lt;p class="lead text-primary"&gt;
This document examines Flask's suitability for large-scale web applications, exploring its extensibility, modular architecture, scaling strategies including caching and load balancing, real-world enterprise adoption by companies like Netflix and Reddit, and essential web deployment patterns including HTTP status code handling for production environments.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-flask"&gt;Introduction to Flask&lt;/h2&gt;
&lt;p&gt;Python with Flask is a lightweight and flexible web application framework. It is known for its simplicity, minimalism, and ease of use. Flask is designed as a micro-framework providing a lightweight structure which facilitates developers in building web applications quickly and easily without compromising on efficiency and ability to scale up from small-scale projects to larger, more complex applications.&lt;/p&gt;</description></item><item><title>Flask Web Framework</title><link>http://ghafoorsblog.com/courses/ibm/rag-agentic-ai-content/rag-agentic-ai-pcert/01-develop-genai-apps/03-module/003-flask/</link><pubDate>Fri, 21 Nov 2025 13:46:18 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/rag-agentic-ai-content/rag-agentic-ai-pcert/01-develop-genai-apps/03-module/003-flask/</guid><description>&lt;p class="lead text-primary"&gt;
This document provides a comprehensive introduction to Flask, a lightweight Python micro framework for web development, exploring its core features including debugging, routing, and templating, along with installation guidelines, built-in dependencies like Werkzeug and Jinja, popular community extensions, and comparative analysis with Django framework.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-flask"&gt;Introduction to Flask&lt;/h2&gt;
&lt;p&gt;Flask is a micro framework that can create web applications. It is not opinionated like some other larger frameworks and does not bind the user to a specific set of tools. One of the core dependencies of Flask is Python. Flask 2.2.2 requires a minimum Python version of 3.7.&lt;/p&gt;</description></item><item><title>Python Setup and Development Environments</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/01-module/002-python-setup/</link><pubDate>Mon, 17 Nov 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/01-module/002-python-setup/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores Python implementations and development environments, helping learners choose the right tools for their programming needs. It covers CPython and alternative implementations, compares popular IDEs, and provides setup guidance for Python development and data science work.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Setting up the right development environment is crucial for productive Python programming. This document covers Python implementations and development tools, helping learners make informed choices about their setup.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="python-implementations"&gt;Python Implementations&lt;/h2&gt;
&lt;p&gt;Python has multiple implementations designed for different use cases, performance requirements, and platform integrations.&lt;/p&gt;</description></item><item><title>Other Debugging Techniques</title><link>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/04-module/007-other-techniques/</link><pubDate>Thu, 13 Nov 2025 14:40:09 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/04-module/007-other-techniques/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores additional debugging techniques beyond command-line tools, focusing on IDE-based debugging with Visual Studio Code, including breakpoint usage, conditional breakpoints, variable inspection, step-through execution, and comparing advantages and disadvantages of IDE debugging versus command-line approaches.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;While command-line debugging tools like PDB provide powerful capabilities, Integrated Development Environments (IDEs) offer visual debugging interfaces that can make the debugging process more intuitive and efficient. Understanding these tools and techniques expands the debugging toolkit available for diagnosing and fixing issues.&lt;/p&gt;</description></item><item><title>Python Crash Debugging</title><link>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/04-module/001-python-crash/</link><pubDate>Thu, 13 Nov 2025 12:40:27 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/04-module/001-python-crash/</guid><description>&lt;p class="lead text-primary"&gt;
This document provides a practical walkthrough of debugging Python exceptions using the PDB debugger, demonstrating how to analyze KeyError exceptions, investigate variable contents, identify UTF-8 Byte Order Mark (BOM) encoding issues, and implement fixes for CSV file processing.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;While C and C++ programs commonly crash with segmentation faults, Python applications typically fail with unexpected exceptions. Understanding how to debug these exceptions using Python&amp;rsquo;s PDB debugger is essential for diagnosing and fixing runtime errors in Python code.&lt;/p&gt;</description></item><item><title>Module Summary</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/05-module/006-module-summary/</link><pubDate>Fri, 25 Jul 2025 06:58:18 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/05-module/006-module-summary/</guid><description>&lt;p class="lead text-primary"&gt;
This document summarizes essential concepts in Python APIs, data manipulation with Pandas, web scraping, HTTP methods, and file formats. It provides a structured overview of their roles and practical applications in Python data science development.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="module-summary"&gt;Module Summary&lt;/h2&gt;
&lt;h3 id="apis-and-data-access-in-python"&gt;APIs and Data Access in Python&lt;/h3&gt;
&lt;p&gt;APIs (Application Programming Interfaces) in Python provide simple and efficient ways to interact with external services, libraries, and data sources. Using libraries such as &lt;code&gt;requests&lt;/code&gt;, Python can send HTTP requests, retrieve data, and parse responses. APIs enable seamless integration with web services, databases, and cloud resources.&lt;/p&gt;</description></item><item><title>File Formats</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/05-module/005-file-formats/</link><pubDate>Fri, 25 Jul 2025 06:51:38 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/05-module/005-file-formats/</guid><description>&lt;p class="lead text-primary"&gt;
This document covers the essential file formats used in data science, such as CSV, JSON, and Excel. It explains their structure, how to read and write them in Python, and the advantages and limitations of each format for data storage and exchange.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;File formats are fundamental to data science, enabling the storage, exchange, and analysis of data. Understanding the structure and use cases of different file formats is crucial for efficient data handling.&lt;/p&gt;</description></item><item><title>Deploying Flask App</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/007-deploying-flask-app/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/007-deploying-flask-app/</guid><description>&lt;p class="lead text-primary"&gt;
This document covers installing Flask, creating and deploying a Python web application, and using Flask's features for CRUD operations and template rendering. It includes step-by-step instructions and code examples for building and running Flask apps.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-flask-and-crud-operations"&gt;Introduction to Flask and CRUD Operations&lt;/h2&gt;
&lt;p&gt;Flask is a micro-framework for building web applications quickly and easily with Python. It supports CRUD operations—Create, Read, Update, and Delete—using HTTP methods such as POST, GET, PUT, PATCH, and DELETE.&lt;/p&gt;</description></item><item><title>Dynamic Routes</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/005-dynamic-routes/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/005-dynamic-routes/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores dynamic routing in Flask, including how to pass parameters in URLs, call external APIs, and use parameter types for robust RESTful endpoints. It covers practical examples for integrating external data and validating user input in web applications.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="calling-external-apis-in-flask"&gt;Calling External APIs in Flask&lt;/h2&gt;
&lt;p&gt;Flask can interact with external APIs using the Python &lt;code&gt;requests&lt;/code&gt; library. This allows applications to fetch, process, and return data from third-party services.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;requests&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;flask&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Flask&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;jsonify&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Flask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="vm"&gt;__name__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nd"&gt;@app.route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/author&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;author_info&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;https://openlibrary.org/search/authors.json?q=Michael+Crichton&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;jsonify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;404&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;message&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Something went wrong.&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;404&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;message&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Server error.&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This example fetches author data from the OpenLibrary API and returns the result to the client, handling different status codes appropriately.&lt;/p&gt;</description></item><item><title>Error Handling</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/006-error-handling/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/006-error-handling/</guid><description>&lt;p class="lead text-primary"&gt;
This document covers HTTP status codes, error handling in Flask, and best practices for returning error responses from API endpoints. It explains status code categories, custom error responses, and application-level error handlers for robust API design.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="understanding-http-status-codes"&gt;Understanding HTTP Status Codes&lt;/h2&gt;
&lt;p&gt;Every HTTP response includes a three-digit status code that indicates the result of the request. Status codes are grouped into categories:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Code Range&lt;/th&gt;
 &lt;th&gt;Category&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;100–199&lt;/td&gt;
 &lt;td&gt;Informational&lt;/td&gt;
 &lt;td&gt;Request received, continuing process&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;200–299&lt;/td&gt;
 &lt;td&gt;Success&lt;/td&gt;
 &lt;td&gt;Request received and processed successfully&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;300–399&lt;/td&gt;
 &lt;td&gt;Redirection&lt;/td&gt;
 &lt;td&gt;Further action needed to complete request&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;400–499&lt;/td&gt;
 &lt;td&gt;Client Error&lt;/td&gt;
 &lt;td&gt;Error in the request from the client&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;500–599&lt;/td&gt;
 &lt;td&gt;Server Error&lt;/td&gt;
 &lt;td&gt;Error on the server side&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Common codes include:&lt;/p&gt;</description></item><item><title>Flask Features</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/002-flask-features/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/002-flask-features/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores the core features of Flask, its dependencies, installation process, and how it compares to Django. It highlights Flask’s extensibility, built-in tools, and popular community extensions for building web applications.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-flask"&gt;Introduction to Flask&lt;/h2&gt;
&lt;p&gt;Flask is a micro web framework for Python, designed to create web applications with minimal dependencies. It is unopinionated, allowing developers to choose their tools and extensions.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="flask-dependencies-and-installation"&gt;Flask Dependencies and Installation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Flask requires Python 3.7 or higher (e.g., Flask 2.2.2).&lt;/li&gt;
&lt;li&gt;Install Flask using pip, preferably in a virtual environment:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;python -m venv venv
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;source&lt;/span&gt; venv/bin/activate
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;pip install &lt;span class="nv"&gt;flask&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;2.2.2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Pin dependency versions in your application to ensure reproducibility across environments.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="built-in-features-of-flask"&gt;Built-in Features of Flask&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Development web server for running applications locally&lt;/li&gt;
&lt;li&gt;Interactive debugger with browser-based stack trace&lt;/li&gt;
&lt;li&gt;Standard Python logging for application and custom logs&lt;/li&gt;
&lt;li&gt;Built-in testing support for test-driven development&lt;/li&gt;
&lt;li&gt;Access to request and response objects for customizing web interactions&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Feature&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Web Server&lt;/td&gt;
 &lt;td&gt;Runs apps in development mode&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Debugger&lt;/td&gt;
 &lt;td&gt;Shows interactive traceback in browser&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Logging&lt;/td&gt;
 &lt;td&gt;Uses Python logging for app and custom messages&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Testing&lt;/td&gt;
 &lt;td&gt;Supports test-driven development&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Request/Response&lt;/td&gt;
 &lt;td&gt;Enables argument parsing and custom responses&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id="additional-features-and-extensions"&gt;Additional Features and Extensions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Static asset support (CSS, JS, images) via template tags&lt;/li&gt;
&lt;li&gt;Dynamic page generation using Jinja templating&lt;/li&gt;
&lt;li&gt;Routing and dynamic URLs for RESTful services&lt;/li&gt;
&lt;li&gt;Global error handlers and user session management&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Popular community extensions:&lt;/p&gt;</description></item><item><title>Libraries and Framework</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/001-libraries-framework/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/001-libraries-framework/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores the distinctions between Python libraries and frameworks, focusing on how frameworks like Flask simplify web application development. It introduces Flask’s core features and practical setup for building web apps.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-libraries-and-frameworks"&gt;Introduction to Libraries and Frameworks&lt;/h2&gt;
&lt;p&gt;Libraries and frameworks are essential tools in Python development. Libraries provide reusable code for specific tasks, while frameworks offer a structured foundation for building applications.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="python-libraries"&gt;Python Libraries&lt;/h2&gt;
&lt;p&gt;A library is a collection of modules or packages that provide specific functionality. Libraries are used to perform tasks such as data analysis, visualization, or machine learning (e.g., NumPy, Pandas).&lt;/p&gt;</description></item><item><title>Packaging</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/01-module/006-packaging/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/01-module/006-packaging/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores the differences between Python modules, packages, and libraries, and provides practical steps for creating, verifying, and using Python packages to organize and reuse code efficiently.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-modules-packages-and-libraries"&gt;Introduction to Modules, Packages, and Libraries&lt;/h2&gt;
&lt;p&gt;Modules, packages, and libraries are essential concepts in Python for organizing and reusing code. Understanding their differences helps in structuring projects effectively.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="python-modules"&gt;Python Modules&lt;/h2&gt;
&lt;p&gt;A Python module is a &lt;code&gt;.py&lt;/code&gt; file containing definitions, statements, functions, or classes. Modules can be imported into other scripts or notebooks to reuse code.&lt;/p&gt;</description></item><item><title>Response and Request Objects</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/004-using-web-api/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/004-using-web-api/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores how Flask handles HTTP requests and responses, including the use of the request and response objects, their key attributes, and methods for extracting and sending data. It covers HTTP method handling, headers, query parameters, and custom responses in Flask applications.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="understanding-flask-request-and-response-objects"&gt;Understanding Flask Request and Response Objects&lt;/h2&gt;
&lt;p&gt;Flask provides two essential objects for handling web communication: the request object and the response object. These objects allow applications to receive data from clients and send data back, supporting a wide range of HTTP methods and custom behaviors.&lt;/p&gt;</description></item><item><title>Routes</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/003-routes/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/003-routes/</guid><description>&lt;p class="lead text-primary"&gt;
This document details how to create and configure routes in Flask, return responses, manage configuration, and structure projects for maintainability. It covers decorators, JSON responses, environment variables, and best practices for organizing Flask code.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-flask-routes"&gt;Introduction to Flask Routes&lt;/h2&gt;
&lt;p&gt;Routes in Flask define how URLs are handled by the application. Each route is associated with a function that returns a response to the client.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="creating-a-basic-flask-application"&gt;Creating a Basic Flask Application&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Install Flask and create a Python file (e.g., &lt;code&gt;app.py&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Import the &lt;code&gt;Flask&lt;/code&gt; class and instantiate the app:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;flask&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Flask&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Flask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="vm"&gt;__name__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="3"&gt;
&lt;li&gt;Define a route using the &lt;code&gt;@app.route&lt;/code&gt; decorator:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nd"&gt;@app.route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;hello_world&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;lt;b&amp;gt;my first Flask application in action!&amp;lt;/b&amp;gt;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="running-the-flask-application"&gt;Running the Flask Application&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Set environment variables for the app and environment:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;FLASK_APP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;app.py
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;FLASK_ENV&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;development
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;flask run
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;The app runs on &lt;code&gt;http://localhost:5000&lt;/code&gt; by default.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;--app&lt;/code&gt; and &lt;code&gt;--debug&lt;/code&gt; flags for configuration and development mode.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="returning-responses-and-json"&gt;Returning Responses and JSON&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Return text or HTML directly from route functions.&lt;/li&gt;
&lt;li&gt;To return JSON, return a serializable object (e.g., dictionary) or use &lt;code&gt;jsonify&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;flask&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;jsonify&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nd"&gt;@app.route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/json&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;json_example&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;jsonify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Hello, JSON!&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;The response will have content type &lt;code&gt;application/json&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="flask-configuration-options"&gt;Flask Configuration Options&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Set configuration via environment variables, the &lt;code&gt;app.config&lt;/code&gt; object, or external files.&lt;/p&gt;</description></item><item><title>Style Guide</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/01-module/004-style-guide/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/01-module/004-style-guide/</guid><description>&lt;p class="lead text-primary"&gt;
This document explains the importance of Python coding standards, focusing on PEP-8 guidelines, naming conventions, and static code analysis. Readers will learn how to write readable, consistent, and maintainable code for collaborative development.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-python-style-guide"&gt;Introduction to Python Style Guide&lt;/h2&gt;
&lt;p&gt;Readable code is essential for team collaboration and long-term maintainability. Python Enhancement Proposal 8 (PEP-8) provides conventions to ensure code is consistently formatted and easy to understand.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="key-pep-8-guidelines-for-readability"&gt;Key PEP-8 Guidelines for Readability&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Use spaces instead of tabs for indentation. Editors may interpret tabs differently, causing formatting errors. Always use four spaces per indentation level for uniformity.&lt;/li&gt;
&lt;li&gt;Separate functions and classes with blank lines to clearly mark code sections.&lt;/li&gt;
&lt;li&gt;Use spaces around operators and after commas to improve clarity.&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Guideline&lt;/th&gt;
 &lt;th&gt;Example (Incorrect)&lt;/th&gt;
 &lt;th&gt;Example (Correct)&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Indentation&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;\tif x==1:&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;if x == 1:&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Blank lines&lt;/td&gt;
 &lt;td&gt;No space between functions&lt;/td&gt;
 &lt;td&gt;Blank line between functions&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Spaces around operators&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;a=b+c&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;a = b + c&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id="coding-conventions-for-consistency"&gt;Coding Conventions for Consistency&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Place larger code blocks inside functions for reusability and clarity.&lt;/li&gt;
&lt;li&gt;Name functions and files using lowercase with underscores (e.g., &lt;code&gt;calculate_sum&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Name classes using CamelCase (e.g., &lt;code&gt;UserProfile&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Name constants in all uppercase with underscores (e.g., &lt;code&gt;MAX_FILE_SIZE&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Element&lt;/th&gt;
 &lt;th&gt;Convention Example&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Function&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;def calculate_sum(a, b):&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;File&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;data_loader.py&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Class&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;class UserProfile:&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Constant&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;MAX_FILE_SIZE = 100&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;

&lt;blockquote class="alert alert-info" role="alert"&gt;
 &lt;p class="alert-heading fw-bold"&gt;
 &lt;svg aria-hidden="true" class="bi bi-info-circle hi-svg-inline me-1 me-lg-2" fill="currentColor" height="1em" viewBox="0 0 16 16" width="1em" xmlns="http://www.w3.org/2000/svg"&gt;
 &lt;path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/&gt;
 &lt;path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/&gt;
&lt;/svg&gt;Note
 &lt;/p&gt;</description></item><item><title>Unit Testing</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/01-module/005-unit-testing/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/01-module/005-unit-testing/</guid><description>&lt;p class="lead text-primary"&gt;
This document explains the fundamentals of unit testing in Python, including the test process, naming conventions, test structure, and how to interpret results. Readers will learn to build, execute, and review unit tests for robust code quality.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-unit-testing"&gt;Introduction to Unit Testing&lt;/h2&gt;
&lt;p&gt;Unit testing validates that individual units of code operate as intended. A unit is a small, testable part of an application, such as a function or method.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="the-unit-test-process"&gt;The Unit Test Process&lt;/h2&gt;
&lt;p&gt;The unit test process involves two main phases:&lt;/p&gt;</description></item><item><title>Rest Api</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/05-module/003-rest-api-2/</link><pubDate>Thu, 24 Jul 2025 14:07:03 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/05-module/003-rest-api-2/</guid><description>&lt;p class="lead text-primary"&gt;
This document covers the use of the Python Requests library for HTTP communication, including GET and POST requests, query strings, request and response objects, and practical examples for interacting with web APIs.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-the-requests-library"&gt;Introduction to the Requests Library&lt;/h2&gt;
&lt;p&gt;The Requests library in Python simplifies sending HTTP/1.1 requests. It supports GET and POST methods, allowing easy interaction with web servers and APIs.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="making-get-requests"&gt;Making GET Requests&lt;/h2&gt;
&lt;p&gt;Import the library and send a GET request:&lt;/p&gt;</description></item><item><title>HTTP Protocols and REST APIs</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/05-module/002-http-protocols/</link><pubDate>Thu, 24 Jul 2025 14:01:59 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/05-module/002-http-protocols/</guid><description>&lt;p class="lead text-primary"&gt;
This document covers the fundamentals of REST APIs, the HTTP protocol, URL structure, request and response cycles, status codes, and HTTP methods. Readers will learn how web communication works and how REST APIs facilitate data transfer between clients and servers.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-http-and-rest-apis"&gt;Introduction to HTTP and REST APIs&lt;/h2&gt;
&lt;p&gt;The HTTP protocol is a standard for transferring information over the web, including REST APIs. REST APIs operate by sending requests and receiving responses using HTTP messages, often containing JSON data.&lt;/p&gt;</description></item><item><title>Api</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/05-module/001-api/</link><pubDate>Thu, 24 Jul 2025 13:58:24 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/05-module/001-api/</guid><description>&lt;p class="lead text-primary"&gt;
This document covers the fundamentals of APIs, API libraries, and REST APIs in Python, including request and response cycles, practical usage with PyCoinGecko, and time series analysis with pandas. Readers will learn how APIs enable communication between software components and how to process and visualize data from web services.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-apis"&gt;Introduction to APIs&lt;/h2&gt;
&lt;p&gt;An Application Programming Interface (API) allows different software components to communicate by exchanging inputs and outputs. APIs abstract the internal workings, enabling users to interact with software through defined methods and data structures.&lt;/p&gt;</description></item><item><title>Module Summary</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/007-module-summary/</link><pubDate>Thu, 24 Jul 2025 13:43:34 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/007-module-summary/</guid><description>&lt;p class="lead text-primary"&gt;
This document summarizes essential concepts in Python file handling, Pandas for data manipulation, and Numpy for numerical and matrix operations. It provides a structured overview of their roles and practical applications in Python data science development.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="module-summary"&gt;Module Summary&lt;/h2&gt;
&lt;h3 id="file-handling-in-python"&gt;File Handling in Python&lt;/h3&gt;
&lt;p&gt;Python provides the &lt;code&gt;open()&lt;/code&gt; function to read, write, and append files, with modes such as &lt;code&gt;r&lt;/code&gt; for reading, &lt;code&gt;w&lt;/code&gt; for writing, and &lt;code&gt;a&lt;/code&gt; for appending. The &lt;code&gt;with&lt;/code&gt; statement ensures files are properly opened and closed. Special characters like &lt;code&gt;\n&lt;/code&gt; indicate new lines, and various methods allow for printing and processing file content.&lt;/p&gt;</description></item><item><title>Two Dimension Numpy</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/006-two-dimension-numpy/</link><pubDate>Thu, 24 Jul 2025 13:30:06 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/006-two-dimension-numpy/</guid><description>&lt;p class="lead text-primary"&gt;
This document covers the creation and manipulation of two-dimensional Numpy arrays, including indexing, slicing, matrix addition, scalar multiplication, Hadamard product, and matrix multiplication. Readers will learn practical techniques for working with 2D data structures in Python.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-2d-numpy-arrays"&gt;Introduction to 2D Numpy Arrays&lt;/h2&gt;
&lt;p&gt;Numpy supports arrays with more than one dimension. Two-dimensional arrays are commonly used to represent matrices and tabular data. Arrays are created by casting nested lists to Numpy arrays.&lt;/p&gt;</description></item><item><title>One Dimensional Numpy</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/005-numpy/</link><pubDate>Thu, 24 Jul 2025 13:18:28 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/005-numpy/</guid><description>&lt;p class="lead text-primary"&gt;
Numpy is a foundational Python library for scientific computing, offering efficient array creation, indexing, slicing, and vector operations. This document covers basic usage, attributes, universal functions, and practical examples for data science and mathematical analysis.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-numpy-and-nd-arrays"&gt;Introduction to Numpy and ND Arrays&lt;/h2&gt;
&lt;p&gt;Numpy provides powerful tools for scientific computing, including ND arrays for storing and manipulating data. Arrays are fixed in size and contain elements of the same type, enabling fast and memory-efficient operations.&lt;/p&gt;</description></item><item><title>Data With Pandas</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/004-data-with-pandas/</link><pubDate>Thu, 24 Jul 2025 13:11:46 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/004-data-with-pandas/</guid><description>&lt;p class="lead text-primary"&gt;
This document covers techniques for analyzing and filtering data in Pandas, including finding unique values in columns, filtering rows based on conditions, and saving results to CSV and other formats. Readers will learn practical steps for working with large datasets efficiently.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="working-with-dataframes-in-pandas"&gt;Working With DataFrames in Pandas&lt;/h2&gt;
&lt;p&gt;Pandas enables efficient data analysis and manipulation using DataFrames. Once a DataFrame is created, various methods can be applied to explore and process the data.&lt;/p&gt;</description></item><item><title>Pandas</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/003-pandas/</link><pubDate>Thu, 24 Jul 2025 12:50:06 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/003-pandas/</guid><description>&lt;p class="lead text-primary"&gt;
Pandas is a powerful Python library for data analysis and manipulation. This document explains how to import Pandas, read CSV and Excel files, create and work with DataFrames, and efficiently access and slice data using various indexing methods. Readers will learn practical techniques for handling tabular data in Python.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-pandas"&gt;Introduction to Pandas&lt;/h2&gt;
&lt;p&gt;Pandas is a widely used Python library that provides tools for data analysis and manipulation. It offers pre-built classes and functions to simplify working with structured data, such as tables and spreadsheets. Importing Pandas is done using the &lt;code&gt;import&lt;/code&gt; command, and it is common to use the abbreviation &lt;code&gt;pd&lt;/code&gt; for convenience.&lt;/p&gt;</description></item><item><title>Writing Files</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/002-writing-files/</link><pubDate>Thu, 24 Jul 2025 12:07:22 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/002-writing-files/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores writing files in Python, covering the open function, file objects, writing methods, appending, copying files, and best practices for file creation and data output.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-writing-files"&gt;Introduction to Writing Files&lt;/h2&gt;
&lt;p&gt;Writing files in Python is essential for data output and storage. The built-in &lt;code&gt;open()&lt;/code&gt; function creates a file object, allowing data to be written using various methods.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="opening-files-for-writing"&gt;Opening Files for Writing&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;open()&lt;/code&gt; function requires the file path and mode:&lt;/p&gt;</description></item><item><title>Reading Files</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/001-reading-files/</link><pubDate>Thu, 24 Jul 2025 12:04:15 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/001-reading-files/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores reading files in Python, covering the open function, file objects, reading methods, and best practices for handling and extracting data from text files.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-reading-files"&gt;Introduction to Reading Files&lt;/h2&gt;
&lt;p&gt;Reading files in Python is essential for data extraction and processing. The built-in &lt;code&gt;open()&lt;/code&gt; function creates a file object, allowing access to file data using various methods.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="opening-files"&gt;Opening Files&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;open()&lt;/code&gt; function requires the file path and mode:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Mode&lt;/th&gt;
 &lt;th&gt;Purpose&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&amp;lsquo;r&amp;rsquo;&lt;/td&gt;
 &lt;td&gt;Read&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&amp;lsquo;w&amp;rsquo;&lt;/td&gt;
 &lt;td&gt;Write&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&amp;lsquo;a&amp;rsquo;&lt;/td&gt;
 &lt;td&gt;Append&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Example:&lt;/p&gt;</description></item><item><title>Module Summary</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/03-module/006-module-summary/</link><pubDate>Thu, 24 Jul 2025 11:51:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/03-module/006-module-summary/</guid><description>&lt;p class="lead text-primary"&gt;
This document summarizes the essential concepts of Python conditions, branching, loops, functions, exception handling, and object-oriented programming. It provides a structured overview of their roles and practical applications in Python development.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="module-summary"&gt;Module Summary&lt;/h2&gt;
&lt;h3 id="conditions-and-branching"&gt;Conditions and Branching&lt;/h3&gt;
&lt;p&gt;Python uses &lt;code&gt;if&lt;/code&gt; statements to control program flow based on Boolean expressions and comparisons. Operators such as &lt;code&gt;==&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;, and &lt;code&gt;!=&lt;/code&gt; are used to compare values, including integers, strings, and floats. Branching is achieved with &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;elif&lt;/code&gt;, and &lt;code&gt;else&lt;/code&gt; statements, allowing different code blocks to execute depending on conditions. Boolean logic operators enable complex decision-making.&lt;/p&gt;</description></item><item><title>Objects and Classes</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/03-module/005-objects-classes/</link><pubDate>Thu, 24 Jul 2025 11:36:56 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/03-module/005-objects-classes/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores Python objects and classes, covering data types, attributes, methods, class construction, and practical examples for object-oriented programming. Readers will learn how to define classes, create objects, and use methods to interact with data.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-objects-and-classes"&gt;Introduction to Objects and Classes&lt;/h2&gt;
&lt;p&gt;Python treats all data types as objects, each with a type, internal representation, and methods for interaction. Objects are instances of classes, which define their structure and behavior.&lt;/p&gt;</description></item><item><title>Exception Handling</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/03-module/004-exception-handling/</link><pubDate>Thu, 24 Jul 2025 11:30:27 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/03-module/004-exception-handling/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores Python exception handling, focusing on the use of try, except, else, and finally statements to manage errors and control program flow. Readers will learn best practices for robust error management and maintaining program stability.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-exception-handling"&gt;Introduction to Exception Handling&lt;/h2&gt;
&lt;p&gt;Exception handling in Python allows programs to respond gracefully to errors, preventing crashes and providing informative feedback to users.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="the-try-except-statement"&gt;The Try-Except Statement&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;try&lt;/code&gt; block contains code that may raise an error. If an error occurs, control moves to the matching &lt;code&gt;except&lt;/code&gt; block.&lt;/p&gt;</description></item><item><title>Functions</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/03-module/003-functions/</link><pubDate>Thu, 24 Jul 2025 11:26:10 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/03-module/003-functions/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores Python functions, covering built-in and user-defined functions, their syntax, parameters, scope, and practical examples for code reuse and data processing. Readers will learn how to define, call, and document functions, and understand variable scope and common function patterns.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-functions"&gt;Introduction to Functions&lt;/h2&gt;
&lt;p&gt;Functions are reusable blocks of code that perform specific tasks. Python provides many built-in functions, and users can define their own to organize and simplify code.&lt;/p&gt;</description></item><item><title>Loops</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/03-module/002-loops/</link><pubDate>Thu, 24 Jul 2025 11:21:41 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/03-module/002-loops/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores Python loops, focusing on for and while loops, the range and enumerate functions, and practical techniques for iterating and manipulating data in lists and tuples. Readers will learn loop syntax, control flow, and common patterns for data processing.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-loops"&gt;Introduction to Loops&lt;/h2&gt;
&lt;p&gt;Loops in Python allow repeated execution of code blocks, making it possible to process sequences of data efficiently. The two main types are for loops and while loops, each suited for different scenarios.&lt;/p&gt;</description></item><item><title>Test Fixture</title><link>http://ghafoorsblog.com/courses/ibm/devops-content/devops-pcert/11-tdd-bdd/02-module/006-test-fixture/</link><pubDate>Tue, 22 Jul 2025 22:49:17 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/devops-content/devops-pcert/11-tdd-bdd/02-module/006-test-fixture/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores the concept of test fixtures in software testing, detailing their purpose, how they establish a known state for tests, and the mechanisms provided by PyUnit to manage test environments and data for reliable, repeatable results.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="understanding-test-fixtures"&gt;Understanding Test Fixtures&lt;/h2&gt;
&lt;p&gt;Test fixtures are essential tools in software testing, used to establish a known initial state before and after running tests. They ensure that each test starts from a consistent environment, making results reliable and repeatable. Fixtures are especially useful when tests depend on specific data, files, or system states.&lt;/p&gt;</description></item><item><title>Module Summary</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/01-module/007-module-summary/</link><pubDate>Sun, 08 Dec 2024 16:54:36 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/01-module/007-module-summary/</guid><description>&lt;p class="lead text-primary"&gt;
This document summarizes the essential concepts of Python data types, operations, variables, string manipulation, and foundational programming features for data science applications.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="module-summary"&gt;Module Summary&lt;/h2&gt;
&lt;h3 id="data-types"&gt;Data Types&lt;/h3&gt;
&lt;p&gt;Python distinguishes among several data types, including integers, floats, strings, and Booleans. Integers are whole numbers, floats include decimals, and strings are ordered sequences of characters. Typecasting allows conversion between types, such as integers to floats or strings. Boolean values represent True or False states.&lt;/p&gt;</description></item><item><title>Module Summary</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/02-module/004-module-summary/</link><pubDate>Sun, 08 Dec 2024 16:54:36 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/02-module/004-module-summary/</guid><description>&lt;p class="lead text-primary"&gt;
This document summarizes the essential concepts of Python data structures, including tuples, lists, dictionaries, and sets. It covers their properties, operations, indexing, slicing, and manipulation techniques for effective data science applications.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="module-summary"&gt;Module Summary&lt;/h2&gt;
&lt;h3 id="tuples"&gt;Tuples&lt;/h3&gt;
&lt;p&gt;Tuples are ordered, immutable collections defined with parentheses &lt;code&gt;()&lt;/code&gt;. They can contain mixed data types and support both positive and negative indexing for element access. Operations such as concatenation and slicing are available, but any modification requires creating a new tuple. Tuples can be nested for complex data structures, and elements in nested tuples are accessed through multi-level indexing.&lt;/p&gt;</description></item><item><title>Introduction to Python</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/01-module/001-python-introduction/</link><pubDate>Thu, 05 Dec 2024 16:54:36 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/01-module/001-python-introduction/</guid><description>&lt;p class="lead text-primary"&gt;
This document introduces Python programming for data science and AI, highlighting its community support, ecosystem, and key libraries. It covers Python's applications in data analysis, machine learning, and deep learning.
&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Python is a highly recommended programming language for data science and AI due to its simplicity and powerful capabilities. It is widely used by professionals and beginners alike because of its clear syntax and extensive documentation. Python&amp;rsquo;s ecosystem includes numerous libraries that facilitate complex tasks with minimal code. It is applicable in various fields such as data analysis, web scraping, big data, finance, computer vision, natural language processing, machine learning, and deep learning.&lt;/p&gt;</description></item></channel></rss>