<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by SbCoding on Medium]]></title>
        <description><![CDATA[Stories by SbCoding on Medium]]></description>
        <link>https://medium.com/@sb.gorkhali?source=rss-8417922d2989------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ugz9MfzRrOmcM-sj-dRGFg.png</url>
            <title>Stories by SbCoding on Medium</title>
            <link>https://medium.com/@sb.gorkhali?source=rss-8417922d2989------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 19:15:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sb.gorkhali/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Django Made Simple: Build Websites Like a Pro (No Coding Experience Needed!)]]></title>
            <link>https://medium.com/@sb.gorkhali/django-made-simple-build-websites-like-a-pro-no-coding-experience-needed-b01eb46b1d8b?source=rss-8417922d2989------2</link>
            <guid isPermaLink="false">https://medium.com/p/b01eb46b1d8b</guid>
            <category><![CDATA[django]]></category>
            <category><![CDATA[websites-to-make-money]]></category>
            <category><![CDATA[django-python-framework]]></category>
            <category><![CDATA[django-python]]></category>
            <dc:creator><![CDATA[SbCoding]]></dc:creator>
            <pubDate>Tue, 14 Jan 2025 23:21:43 GMT</pubDate>
            <atom:updated>2025-01-14T23:21:43.482Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*ol0yqsBDLe-D1bYV11c6tQ@2x.jpeg" /></figure><p>Building a website sounds like a job for experts, right? But what if I told you that anyone – even without a tech background – can create websites with a tool called Django? Let’s break it down so that you can see how simple and fun it can be!</p><p><strong>What is Django?</strong></p><p>Django (pronounced “Jang-oh”) is a free, open-source framework built with Python. Think of it as a toolkit for creating websites quickly and efficiently. It handles many of the tricky technical parts for you, so you can focus on your ideas.</p><p>With Django, you don’t need to reinvent the wheel. It provides pre-built tools for things like:</p><p>•	Managing users (login/signup)</p><p>•	Storing and retrieving data (like. Vs product. details or blog posts)</p><p>•	Displaying content on a webpage</p><p>In short, Django makes building websites easier, faster, and more secure.</p><p><strong>Why is Django Perfect for Beginners?</strong></p><p>1.	Simplicity: Django is designed to help you focus on what matters – your ideas! It handles the technical complexities in the background.</p><p>2.	“Batteries Included”: Out of the box, Django provides tools for tasks like user authentication, database setup, and URL routing.</p><p>3.	Massive Community: Thousands of people use Django, so there’s a wealth of tutorials and forums to help you if you get stuck.</p><p>4.	Great Documentation: Django’s official guide is beginner-friendly and explains things step by step.</p><p><strong>How Does Django Work?</strong></p><p>Django organizes your project into three parts using the Model-View-Template (MVT) pattern:</p><p>1.	Model: Manages the data. If you’re creating a recipe app, the model would store details like the name, ingredients, and steps for each recipe.</p><p>2.	View: The logic behind your app. It fetches data from the model and decides what to show on the screen.</p><p>3.	Template: The design and layout users see, like the webpage itself.</p><p>Imagine you’re making a cookbook website. Django connects the dots:</p><p>•	Recipes are stored in the database (Model).</p><p>•	You tell Django to show recipes based on user requests (View).</p><p>•	Users see the recipe details beautifully displayed (Template).</p><p><strong>Getting Started: Your First Django Project</strong></p><p>Here’s how easy it is to build your first Django app:</p><p>1.	Install Django:</p><p>Open your terminal or command prompt and type:</p><p>pip install django</p><p>2.	Create a New Project:</p><p>Start your project by running:</p><pre>django-admin startproject myproject<br>cd myproject</pre><p>3.django-admin startproject myproject</p><p>cd myproject</p><p><strong>What Can You Build with Django?</strong></p><p>The possibilities are endless:</p><p>•	Personal Blog: Share your thoughts online.</p><p>•	E-Commerce Store: Sell products with user accounts and payments.</p><p>•	Social Network: Build a platform for people to connect.</p><p>•	Portfolio Website: Show off your skills and projects.</p><p><strong>Why Should You Try Django?</strong></p><p>Django isn’t just for professional developers. It’s for anyone who wants to create something online. Whether you’re a student, a small business owner, or just curious about web development, Django empowers you to turn your ideas into reality.</p><p>So, why wait? Take your first step today, and you might just discover how fun and rewarding it is to build with Django.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b01eb46b1d8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Django: The Superpower Behind Websites]]></title>
            <link>https://medium.com/@sb.gorkhali/django-the-superpower-behind-websites-0f0b65ead08f?source=rss-8417922d2989------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f0b65ead08f</guid>
            <category><![CDATA[django-rest-framework]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[website]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[SbCoding]]></dc:creator>
            <pubDate>Mon, 30 Dec 2024 14:00:44 GMT</pubDate>
            <atom:updated>2024-12-30T14:00:44.310Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4WIs_qK7esiUemWwz-Sa8Q.png" /></figure><p>Have you ever wondered how websites like Instagram or Pinterest handle millions of users while staying fast and secure? The secret sauce is Django, a powerful web framework written in Python. Let’s dive into what Django is and how it makes creating websites easy, even for beginners!</p><h3>What is Django?</h3><p>Django is a tool that helps developers build websites quickly and efficiently. Think of it as a construction kit for the web, providing all the essential building blocks so you don’t have to start from scratch.</p><p>With Django, you can:</p><ul><li>Handle user registrations and logins.</li><li>Store and manage data in a database.</li><li>Create dynamic web pages that change based on user input.</li></ul><h3>Example: A Recipe Website</h3><p>Imagine you want to create a recipe-sharing website. With Django, you can:</p><ol><li><strong>Build a Recipe Database</strong>:Store recipe names, ingredients, and cooking instructions.</li><li><strong>Allow Users to Interact</strong>:Enable users to sign up, submit their recipes, and comment on others.</li><li><strong>Dynamic Content</strong>:Display a personalized list of recipes based on user preferences or trending dishes.</li></ol><h3>Why Django is Awesome</h3><ol><li><strong>Fast Development</strong>: Django comes with ready-made tools like authentication, admin dashboards, and database management, so you can focus on your website’s features.</li><li><strong>Secure</strong>: It protects your site from common threats like hackers trying to break in.</li><li><strong>Scalable</strong>: Whether it’s a small blog or a big e-commerce platform, Django can handle it.</li></ol><h3>How Django Works (Simple Terms)</h3><p>Django follows an easy-to-understand pattern called <strong>MTV</strong>:</p><ul><li><strong>Model</strong>: Manages your data (e.g., storing recipes in a database).</li><li><strong>Template</strong>: Handles how your website looks (e.g., HTML for displaying recipes).</li><li><strong>View</strong>: Connects the dots (e.g., fetches recipes from the database and sends them to the user’s browser).</li></ul><h3>Quick Example: Hello, World!</h3><p>Here’s how simple it is to create a basic Django website:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*IrS4c-EM7cgEEobWW5GfOQ.png" /><figcaption>Visit <a href="http://127.0.0.1:8000,">http://127.0.0.1:8000,</a> and you’ll see your first Django-powered webpage!</figcaption></figure><h3>Conclusion</h3><p>Django is like having a superhero sidekick for web development. It handles the heavy lifting, so you can focus on creating amazing websites. Whether it’s a personal blog or a social media platform, Django makes it possible for anyone to bring their ideas to life.</p><p><em>Ready to build your dream website? Give Django a try and unleash its superpowers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f0b65ead08f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beautiful Soup: The Web Scraping Superhero]]></title>
            <link>https://medium.com/@sb.gorkhali/beautiful-soup-the-web-scraping-superhero-a2cd274ae8e3?source=rss-8417922d2989------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2cd274ae8e3</guid>
            <category><![CDATA[your-future]]></category>
            <category><![CDATA[beautifulsoup]]></category>
            <category><![CDATA[web-scraping]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[SbCoding]]></dc:creator>
            <pubDate>Sun, 29 Dec 2024 03:03:15 GMT</pubDate>
            <atom:updated>2024-12-29T03:03:15.208Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AM9ZxygfCLOrui5WojSXZA.png" /></figure><p>first things first you need to install beautiful soup in you pc. you can follow the link below <a href="https://pypi.org/project/beautifulsoup4/">https://pypi.org/project/beautifulsoup4/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*FXhVOtV_mtIx4UQD6A8gIg.png" /></figure><p><strong>Beautiful Soup: The Web Scraping Superhero</strong></p><p>Imagine you’re browsing the web and find a treasure trove of information — movie ratings, recipes, or weather data — but there’s no easy way to copy it all. This is where <strong>Beautiful Soup</strong>, a Python library, comes to the rescue!</p><p>Beautiful Soup is like a magical tool that helps you grab data from websites effortlessly. It works by breaking down a webpage’s HTML (the code behind websites) into a structure you can navigate and extract specific pieces of information. Think of it as a personal assistant who organizes a messy closet so you can find exactly what you need.</p><h3>What Can Beautiful Soup Do?</h3><ul><li><strong>Extract Links</strong>: Want all the links from a page? It’s as easy as a single command.</li><li><strong>Grab Tables or Lists</strong>: Need data from a table? Beautiful Soup can fetch it in seconds.</li><li><strong>Work with Messy Data</strong>: Even if a website’s code is poorly written, Beautiful Soup makes sense of it.</li></ul><h3>Why is it Popular?</h3><p>It’s simple, beginner-friendly, and works beautifully with Python. Whether you’re a data enthusiast, a student, or someone curious about scraping, Beautiful Soup makes the process easy.</p><h3>A Quick Example</h3><p>Let’s say you want to grab all the headings from a webpage:</p><pre>from bs4 import BeautifulSoup  <br>import requests  <br><br>url = &quot;https://example.com&quot;  <br>html = requests.get(url).content  <br>soup = BeautifulSoup(html, &quot;html.parser&quot;)  <br><br>headings = [h.text for h in soup.find_all(&quot;h1&quot;)]  <br>print(headings)</pre><h3>Finally What you can do Beautiful Soup</h3><p>Beautiful Soup is a gateway to exploring the vast world of web data. It’s not just for IT experts; anyone with a bit of curiosity can start using it. So, the next time you wish for an easy way to gather information online, remember Beautiful Soup — your web scraping superhero!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2cd274ae8e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Oops Concepts in Python]]></title>
            <link>https://medium.com/@sb.gorkhali/oops-concepts-in-python-6d4e9b14ac89?source=rss-8417922d2989------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d4e9b14ac89</guid>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[SbCoding]]></dc:creator>
            <pubDate>Tue, 24 Dec 2024 14:13:36 GMT</pubDate>
            <atom:updated>2024-12-24T14:13:36.191Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dXOsk4dXuGUfus7UGj4QLw.png" /></figure><p>Object-Oriented Programming (OOP) in Python revolves around the key principles: <strong>Class</strong>, <strong>Object</strong>, <strong>Method</strong>, <strong>Inheritance</strong>, <strong>Polymorphism</strong>, <strong>Data Abstraction</strong>, and <strong>Encapsulation</strong>. Let’s break them down in simple terms.</p><h4>1. Class and Object</h4><ul><li><strong>Class</strong>: A blueprint or template to create objects. It defines properties and behaviors.</li><li><strong>Object</strong>: An instance of a class. It holds data (attributes) and performs actions (methods) defined in the class.</li></ul><pre>class Dog:  <br>    def __init__(self, name, age):  <br>        self.name = name  <br>        self.age = age  <br><br>    def bark(self):  <br>        print(f&quot;{self.name} is barking!&quot;)  <br><br># Creating an object from the Dog class  <br>my_dog = Dog(&quot;Buddy&quot;, 5)  <br>my_dog.bark()  # Output: Buddy is barking!</pre><h4>2. Method</h4><ul><li>Functions defined inside a class that operate on the object’s data.</li></ul><pre>class Circle:  <br>    def __init__(self, radius):  <br>        self.radius = radius  <br><br>    def area(self):  <br>        return 3.14 * self.radius ** 2  <br><br>circle = Circle(10)  <br>print(circle.area())  # Output: 314.0</pre><h4>3. Inheritance</h4><ul><li>Allows a class to inherit attributes and methods from another class.</li><li>Promotes code reuse and reduces redundancy.</li></ul><pre>class Animal:  <br>    def speak(self):  <br>        print(&quot;Animal speaks&quot;)  <br><br>class Dog(Animal):  <br>    def speak(self):  <br>        print(&quot;Dog barks&quot;)  <br><br>d = Dog()  <br>d.speak()  # Output: Dog barks</pre><h4>4. Polymorphism</h4><ul><li>Allows objects to be treated as instances of their parent class.</li><li>Enables different classes to define the same method in different ways.</li></ul><pre>class Shape:  <br>    def area(self):  <br>        pass  <br><br>class Circle(Shape):  <br>    def area(self):  <br>        return 3.14 * 5 ** 2  <br><br>class Square(Shape):  <br>    def area(self):  <br>        return 4 ** 2  <br><br>shapes = [Circle(), Square()]  <br>for shape in shapes:  <br>    print(shape.area())  # Output: 78.5, 16</pre><h4>5. Data Abstraction</h4><ul><li>Hides the complexity of the implementation and only exposes necessary details.</li><li>Focuses on what an object does, not how it does it.</li></ul><pre>class Car:  <br>    def __init__(self, brand):  <br>        self._brand = brand  # Encapsulating data<br><br>    def display(self):  <br>        print(f&quot;Car brand: {self._brand}&quot;)<br><br>my_car = Car(&quot;Toyota&quot;)  <br>my_car.display()  # Output: Car brand: Toyota</pre><h4>6. Encapsulation</h4><ul><li>Bundling data (attributes) and methods (functions) within a class.</li><li>Hides the internal state of an object from external access.</li></ul><pre>class BankAccount:  <br>    def __init__(self, balance):  <br>        self._balance = balance  # Private attribute  <br><br>    def deposit(self, amount):  <br>        self._balance += amount  <br><br>    def get_balance(self):  <br>        return self._balance  <br><br>account = BankAccount(1000)  <br>account.deposit(500)  <br>print(account.get_balance())  # Output: 1500</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d4e9b14ac89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Selenium Automating the Web]]></title>
            <link>https://medium.com/@sb.gorkhali/selenium-automating-the-web-e0cdd0a24103?source=rss-8417922d2989------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0cdd0a24103</guid>
            <category><![CDATA[selenium]]></category>
            <category><![CDATA[web-browser]]></category>
            <category><![CDATA[automating]]></category>
            <dc:creator><![CDATA[SbCoding]]></dc:creator>
            <pubDate>Mon, 23 Dec 2024 12:34:07 GMT</pubDate>
            <atom:updated>2024-12-23T12:34:07.904Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O5r2Sfbp8NS6ezTrilDHSA.png" /></figure><p>Selenium is a powerful tool that lets you automate web browsers. Imagine you want to test a website, fill out a form, or scrape dynamic content without manually clicking and typing — Selenium makes all this possible. It’s like having a personal assistant for your browser that follows your instructions exactly.</p><h4>How Does Selenium Work?</h4><p>Selenium interacts with a browser just like a real user. It can:</p><ul><li>Open web pages.</li><li>Click buttons and links.</li><li>Fill out forms.</li><li>Scroll through content.</li><li>Capture data from dynamic websites.</li></ul><p>With Python, Selenium becomes even more user-friendly, enabling quick setup and execution of automated tasks.</p><h4>Real-World Example: Automating Login</h4><p>Suppose you need to log into a website daily to check updates. Here’s how Selenium can help:</p><pre>from selenium import webdriver<br>from selenium.webdriver.common.by import By<br>from selenium.webdriver.common.keys import Keys<br><br># Set up the browser driver (e.g., ChromeDriver)<br>driver = webdriver.Chrome()<br><br># Open the login page<br>driver.get(&quot;https://example.com/login&quot;)<br><br># Find and fill out the username and password fields<br>username = driver.find_element(By.ID, &quot;username&quot;)<br>password = driver.find_element(By.ID, &quot;password&quot;)<br><br>username.send_keys(&quot;your_username&quot;)<br>password.send_keys(&quot;your_password&quot;)<br><br># Click the login button<br>login_button = driver.find_element(By.ID, &quot;login-button&quot;)<br>login_button.click()<br><br># Done!<br>print(&quot;Logged in successfully&quot;)<br>driver.quit()</pre><p>In this example, Selenium opens the browser, enters your credentials, and logs you in — all automatically.</p><h4>Why Use Selenium?</h4><ol><li><strong>Testing Websites:</strong> Automate repetitive tests for web applications.</li><li><strong>Scraping Dynamic Content:</strong> Access data that changes with user interaction.</li><li><strong>Simulating User Actions:</strong> Perform tasks like clicking, typing, and scrolling.</li><li><strong>Speeding Up Workflow:</strong> Save time by automating routine web interactions.</li></ol><p>Selenium is widely used by developers and testers for its flexibility and ease of use. Whether you’re automating mundane tasks or testing complex web apps, Selenium is your go-to tool for making the web work for us!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0cdd0a24103" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Scraping in Python]]></title>
            <link>https://medium.com/@sb.gorkhali/web-scraping-in-python-ff588efc32be?source=rss-8417922d2989------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff588efc32be</guid>
            <category><![CDATA[job-hunting]]></category>
            <category><![CDATA[web-scraping]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[SbCoding]]></dc:creator>
            <pubDate>Mon, 23 Dec 2024 12:22:35 GMT</pubDate>
            <atom:updated>2024-12-23T12:22:35.631Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uViqxEcKpbllmmezZD1lCw.png" /></figure><h3>Unlocking Data from the Web</h3><p>Web scraping is the process of extracting data from websites and organizing it into a structured format, such as spreadsheets or databases. Think of it as a way to collect valuable information without manually copying and pasting it. With Python, web scraping becomes both powerful and accessible, thanks to libraries like BeautifulSoup, Scrapy, and Selenium.</p><h4>How Does Web Scraping Work?</h4><p>Web scraping involves a few key steps:</p><ol><li><strong>Sending a Request:</strong> A Python program, called a scraper, requests the HTML content of a webpage.</li><li><strong>Parsing the Data:</strong> The HTML is parsed to find specific information like titles, prices, or images.</li><li><strong>Extracting Information:</strong> Relevant data is extracted based on the desired structure.</li><li><strong>Storing the Data:</strong> Finally, the data is saved for further analysis or use.</li></ol><p>Here’s a simple Python example using BeautifulSoup to scrape article titles:</p><pre>import requests<br>from bs4 import BeautifulSoup<br><br>url = &quot;https://example.com&quot;<br>response = requests.get(url)<br>soup = BeautifulSoup(response.text, &#39;html.parser&#39;)<br>titles = soup.find_all(&#39;h2&#39;)<br><br>for title in titles:<br>    print(title.text)</pre><h4>Application of Web Scraping</h4><ol><li><strong>Price Comparison:</strong> Scrape e-commerce sites to compare prices and find the best deals.</li><li><strong>Market Research:</strong> Collect data from reviews, ratings, or competitor websites.</li><li><strong>Job Hunting:</strong> Extract job listings and salaries from online job portals.</li><li><strong>Content Aggregation:</strong> Gather news, blog posts, or statistics for easy access.</li><li><strong>Academic Research:</strong> Extract datasets from public websites for analysis.</li></ol><h4>Ethical and Legal Considerations</h4><p>While web scraping is a powerful tool, it’s essential to respect a website’s terms of service and avoid scraping private or sensitive data without permission. Always use ethical practices and, when in doubt, seek approval from the website owner.</p><p>Web scraping in Python offers endless opportunities to unlock the power of data on the web. With just a few lines of code, you can automate repetitive tasks, gather insights, and even create new applications. Start exploring today, and let Python bring the internet to your fingertips!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff588efc32be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API in Python]]></title>
            <link>https://medium.com/@sb.gorkhali/api-in-python-1993ca4fa9c2?source=rss-8417922d2989------2</link>
            <guid isPermaLink="false">https://medium.com/p/1993ca4fa9c2</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[for-you-and-all]]></category>
            <dc:creator><![CDATA[SbCoding]]></dc:creator>
            <pubDate>Mon, 23 Dec 2024 12:03:49 GMT</pubDate>
            <atom:updated>2024-12-23T12:03:49.875Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GZG0TtwS0ZRuFHIb0Ts_BQ.png" /></figure><h3>What is an API in Python?</h3><p>An <strong>API</strong> (Application Programming Interface) is like a menu in a restaurant. Imagine you’re at your favorite diner. You don’t need to know how the food is prepared in the kitchen; you just look at the menu, make your choice, and the waiter brings your food. Similarly, an API lets you interact with an application or service without needing to know the complex details of how it works internally.</p><p>In Python, APIs are often used to connect your program with external services or data, such as weather apps, social media platforms, or payment gateways.</p><h4>Weather API</h4><p>Let’s say you want to know the weather forecast for your city without opening a weather app. A Weather API makes this possible. Here’s how it works:</p><ol><li>You (the user) request the weather information by sending a query to the API’s URL.</li><li>The API retrieves the data from its database.</li><li>It sends the information back to you in a simple, understandable format (like JSON or plain text).</li></ol><p>Here’s a snippet of Python code using the OpenWeatherMap API:</p><pre>import requests<br><br># Replace with your actual API key<br>API_KEY = &#39;your_api_key_here&#39;<br>city = &#39;Tokyo&#39;<br>url = f&quot;https://api.openweathermap.org/data/2.5/weather?q={city}&amp;appid={API_KEY}&quot;<br><br>response = requests.get(url)<br>data = response.json()<br><br>if response.status_code == 200:<br>    print(f&quot;Current temperature in {city}: {data[&#39;main&#39;][&#39;temp&#39;]}K&quot;)<br>else:<br>    print(&quot;Error fetching data&quot;)</pre><p>This program fetches the current weather for Tokyo and prints it. Even if you’re not an IT expert, it’s like typing your city name into a weather app and seeing the results instantly.</p><h4>Why APIs Matter</h4><p>APIs save time, reduce complexity, and make applications more powerful by letting them “talk” to each other. For example:</p><ul><li>Booking a flight? The app uses an API to get available flights.</li><li>Posting photos on social media? APIs connect your app to the platform.</li><li>Paying online? Payment APIs handle the transaction.</li></ul><h4>Visual Representation</h4><p>To visualize this, here’s an analogy:<strong>User</strong> -&gt; [API Menu] -&gt; <strong>Service/Database</strong> -&gt; [Response] -&gt; <strong>User</strong>Imagine yourself using Uber. You select a ride through the app (API menu), and the app fetches available drivers from the backend database and shows the results in seconds. APIs are the magic behind this seamless interaction!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1993ca4fa9c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Stunning User Interfaces with Python]]></title>
            <link>https://medium.com/@sb.gorkhali/building-stunning-user-interfaces-with-python-589839cc4b73?source=rss-8417922d2989------2</link>
            <guid isPermaLink="false">https://medium.com/p/589839cc4b73</guid>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[ｐｙｔｈｏｎ]]></category>
            <dc:creator><![CDATA[SbCoding]]></dc:creator>
            <pubDate>Wed, 11 Dec 2024 14:15:27 GMT</pubDate>
            <atom:updated>2024-12-11T14:15:27.815Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*qcdvENux3zgxls95qFQalw.png" /></figure><p>Creating beautiful and interactive user interfaces (UIs) doesn’t have to be complicated. With Python, you can easily build UIs that enhance user experience across platforms.</p><h4>Why Use Python for UI Development?</h4><ul><li><strong>Simplicity &amp; Readability</strong>: Python’s clean syntax makes UI development easy and accessible.</li><li><strong>Powerful Libraries</strong>: Libraries like Tkinter, PyQt, and Kivy offer pre-built components for designing modern UIs.</li><li><strong>Cross-Platform Support</strong>: Python apps run seamlessly on Windows, macOS, and Linux.</li></ul><h4>Tools to Build UIs in Python:</h4><ol><li><strong>Tkinter</strong>: A simple and effective library for creating basic UIs.</li></ol><pre>import tkinter as tk<br>root = tk.Tk()<br>tk.Label(root, text=&quot;Hello, World!&quot;).pack()<br>tk.Button(root, text=&quot;Click Me&quot;).pack()<br>root.mainloop()</pre><p>2.<strong>PyQt</strong>: Ideal for more advanced and customizable UIs.</p><pre>from PyQt5.QtWidgets import QApplication, QLabel, QPushButton, QWidget<br>app = QApplication([])<br>window = QWidget()<br>window.setWindowTitle(&#39;PyQt Example&#39;)<br>QLabel(&#39;Hello from PyQt!&#39;, window).move(50, 50)<br>window.show()<br>app.exec_()</pre><p>3.<strong>Kivy</strong>: Best for cross-platform mobile and desktop apps.</p><pre>from kivy.app import App<br>from kivy.uix.label import Label<br>class MyApp(App):<br>    def build(self):<br>        return Label(text=&quot;Hello from Kivy!&quot;)<br>MyApp().run()</pre><h4>Summery</h4><p>Python’s rich ecosystem makes UI development fun and effective. Whether you’re creating desktop applications or mobile apps, tools like Tkinter, PyQt, and Kivy empower you to design modern, user-friendly interfaces effortlessly. Start building your own UI today!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=589839cc4b73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking the Power of Object-Oriented Programming (OOP) in Python]]></title>
            <link>https://medium.com/@sb.gorkhali/unlocking-the-power-of-object-oriented-programming-oop-in-python-110d678d737c?source=rss-8417922d2989------2</link>
            <guid isPermaLink="false">https://medium.com/p/110d678d737c</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ｐｙｔｈｏｎ]]></category>
            <category><![CDATA[data-oriented-programming]]></category>
            <dc:creator><![CDATA[SbCoding]]></dc:creator>
            <pubDate>Wed, 11 Dec 2024 13:41:19 GMT</pubDate>
            <atom:updated>2024-12-11T13:41:19.185Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*eAB1hH9kqHwb3NDaRZPUeA.png" /></figure><p>Object-Oriented Programming (OOP) is a powerful paradigm that makes Python a go-to language for building scalable and reusable code. In this article, we’ll break down the key concepts of OOP and provide real-life examples that anyone can follow.</p><h3>What is OOP?</h3><p>OOP organizes code into objects — data structures that combine attributes (data) and methods (functions). This approach promotes modularity and code reuse, making your programs easier to read and maintain.</p><h3>Core Principles of OOP</h3><ol><li><strong>Encapsulation</strong>: Bundling data and methods into a single unit (object).</li><li><strong>Inheritance</strong>: Sharing functionality between classes.</li><li><strong>Polymorphism</strong>: Using a single interface for different underlying data types.</li><li><strong>Abstraction</strong>: Hiding complex details to highlight essential features.</li></ol><h3>OOP in Action</h3><p>Let’s see how OOP works with a real-world example: a library system.</p><h4>Step 1: Define a Class</h4><p>A class is like a blueprint for creating objects.</p><pre>class Book:<br>    def __init__(self, title, author):<br>        self.title = title<br>        self.author = author<br><br>    def display_info(self):<br>        print(f&quot;{self.title} by {self.author}&quot;)</pre><h4>Step 2: Create Objects</h4><p>Objects are instances of a class.</p><pre>book1 = Book(&quot;1984&quot;, &quot;George Orwell&quot;)<br>book2 = Book(&quot;To Kill a Mockingbird&quot;, &quot;Harper Lee&quot;)<br><br>book1.display_info()  # Output: 1984 by George Orwell<br>book2.display_info()  # Output: To Kill a Mockingbird by Harper Lee</pre><h4>Step 3: Add Inheritance</h4><p>Let’s create a specialized class for eBooks.</p><pre>class EBook(Book):<br>    def __init__(self, title, author, file_size):<br>        super().__init__(title, author)<br>        self.file_size = file_size<br><br>    def display_info(self):<br>        print(f&quot;{self.title} by {self.author} [File Size: {self.file_size}MB]&quot;)<br>---------------------------------------------------------------------------------<br>ebook = EBook(&quot;Sapiens&quot;, &quot;Yuval Noah Harari&quot;, 5)<br>ebook.display_info()  # Output: Sapiens by Yuval Noah Harari [File Size: 5MB]</pre><h3>Why Use OOP?</h3><ul><li><strong>Modularity</strong>: Break down complex systems into manageable pieces.</li><li><strong>Reusability</strong>: Use existing classes to create new ones.</li><li><strong>Scalability</strong>: Easily expand programs with minimal changes.</li></ul><h3>Everyday Applications</h3><ul><li><strong>Web Development</strong>: Models for users, posts, and comments.</li><li><strong>Game Development</strong>: Characters and environments.</li><li><strong>Data Analysis</strong>: Structuring datasets and operations.</li></ul><h3>Final Thoughts</h3><p>OOP is a cornerstone of Python programming. By mastering its principles, you’ll be equipped to build efficient, scalable, and maintainable software. Start small, experiment, and embrace the elegance of OOP in your coding journey!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=110d678d737c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Randomization in Python]]></title>
            <link>https://medium.com/@sb.gorkhali/randomization-in-python-b142fa8b40e6?source=rss-8417922d2989------2</link>
            <guid isPermaLink="false">https://medium.com/p/b142fa8b40e6</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[random]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[atomization]]></category>
            <dc:creator><![CDATA[SbCoding]]></dc:creator>
            <pubDate>Wed, 11 Dec 2024 13:27:03 GMT</pubDate>
            <atom:updated>2024-12-11T13:27:03.401Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*L-5XzMfhksNBkRENOWDe-Q.png" /><figcaption>Python’s random module is a fantastic tool for adding unpredictability to your programs. From games to password generators, it’s got you covered. Let’s dive into a few simple examples to understand how it works.</figcaption></figure><h3>Toss a Coin</h3><p>Want to make a quick decision? Use Python to flip a virtual coin:</p><pre>import random<br><br>result = random.choice([&#39;Heads&#39;, &#39;Tails&#39;])<br>print(f&quot;The coin shows: {result}&quot;)</pre><h3>Roll a Dice</h3><p>Simulate a dice roll for your next board game:</p><pre>import random<br><br>dice_roll = random.randint(1, 6)<br>print(f&quot;You rolled a: {dice_roll}&quot;)</pre><h3>Shuffle a Deck</h3><p>Need to randomize a list? Shuffle it like a pro:</p><pre>mport random<br><br>deck = [&#39;Ace&#39;, &#39;2&#39;, &#39;3&#39;, &#39;4&#39;, &#39;5&#39;, &#39;6&#39;, &#39;7&#39;, &#39;8&#39;, &#39;9&#39;, &#39;10&#39;, &#39;Jack&#39;, &#39;Queen&#39;, &#39;King&#39;]<br>random.shuffle(deck)<br>print(&quot;Shuffled deck:&quot;, deck)</pre><h3>Create a Password</h3><p>Generate a strong, random password effortlessly:</p><pre>mport random<br>import string<br><br>password = &#39;&#39;.join(random.choices(string.ascii_letters + string.digits, k=12))<br>print(f&quot;Your password: {password}&quot;)</pre><h3>Why Use It?</h3><p>The random module is perfect for games, decision-making, or any scenario where unpredictability is key. Just remember, it’s not suitable for secure encryption—use the secrets module for that.</p><p>Start exploring today, and see how randomization can simplify our projects!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b142fa8b40e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>