Python
February 23, 2024 / April 4, 2024 by admin | Leave a Comment
Mocking in Python is a powerful technique used in unit testing to isolate the code being tested from its dependencies. It allows us to simulate the behavior of complex, real (non-deterministic) systems in order to test our code in isolation. In this article, we will discuss how to use mocks with unittest in Python for […]
Read more »
February 20, 2024 / April 4, 2024 by admin | Leave a Comment
Introduction Test-driven development (TDD) is an approach where you write tests before writing your actual code. The idea behind TDD is to ensure that all the units in your application are working as expected, and it helps in maintaining high quality code. In Python, we can use a testing framework like unittest or pytest for […]
Python Python Basics
February 19, 2024 / April 4, 2024 by admin | Leave a Comment
In programming, we often need to control the flow of our code based on certain conditions. One such condition is when we want to exit a loop prematurely. This can be achieved using the break statement. In this blog post, I will explain how to use break with both for and while loops in Python. […]
February 18, 2024 / April 4, 2024 by admin | Leave a Comment
In programming, the continue statement is used to skip the rest of the code inside a loop for the current iteration only. It then continues with the next iteration of the loop. This can be very useful when you want to bypass some specific conditions during your loops. Using continue in Python for Loop The […]
Module Python
February 12, 2024 / April 4, 2024 by admin | Leave a Comment
Introduction Website scraping or crawling is an automated method used to extract large amounts of data from websites. It’s a useful tool when you want to gather information from the internet programmatically, which can be used for various purposes such as market research, price monitoring, and more. In this blog post, we will discuss how […]
February 10, 2024 / April 4, 2024 by admin | Leave a Comment
In BeautifulSoup, selectors are used for navigating the parse tree of an HTML document. They allow you to specify exactly which elements you want to extract from the page. There are several types of selectors available in BeautifulSoup: Prerequisites As this is an advanced Python application, the following blog articles are helpful: Python Basics Tutorials […]
February 9, 2024 / April 4, 2024 by admin | Leave a Comment
The use cases for extracting content from a website are diverse. Extracting content from a website is primarily used for data analysis, search engine indexing, competition analysis, lead generation or content aggregation. Websites themselves are realized with HTML. HTML is a tree-based language that uses tags to structure content. This means that it represents a […]
February 7, 2024 / April 4, 2024 by admin | Leave a Comment
Beautiful Soup is a Python library for extracting data from XML and HTML files. It creates a parse tree from the page’s source code, which can be used to extract the data in a hierarchical and readable manner. Introduction Beautiful Soup is a Python library for pulling data out of HTML and XML files. It […]
February 5, 2024 / April 4, 2024 by admin | Leave a Comment
This list includes our blog articles that are perfect for those who are just starting out with learning Python. Each article provides valuable information and examples to help you understand different concepts of this popular programming language. Why Choose Python? Understand why Python is an excellent choice as your first or next programming language, its […]
February 4, 2024 / April 4, 2024 by admin | Leave a Comment
Python’s math module is a powerful tool that provides mathematical functions for various operations, including trigonometry, logarithms, factorials, etc. It’s an essential part of any Python developer’s toolkit and understanding it can greatly enhance their programming skills. Importing the Math Module Before you start using math functions, you need to import the math module in […]
February 3, 2024 / April 4, 2024 by admin | Leave a Comment
Python’s datetime module is an essential tool for handling dates and times in your code. It provides classes to work with date, time, and even more complex objects like timedelta (a duration of time). This guide will cover the basics of using Python’s datetime module. Understanding Datetime Objects The datetime object represents a single point […]