<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>https://bugfactory.io/articles-on-python/</id>
  <link href="https://bugfactory.io/"/>
  <link rel="self" type="application/atom+xml" href="https://bugfactory.io/articles-on-python/feed.xml"/>
  <title>Web Development for SaaS Businesses | BugFactory</title>
  <updated>2025-09-15T00:00:00Z</updated>
  <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
  
      <entry>
        <id>https://bugfactory.io/articles/how-to-return-two-values-from-a-python-function/</id>
        <link href="https://bugfactory.io/articles/how-to-return-two-values-from-a-python-function/"/>
        <title>How to Return Two Values from a Python Function</title>
        <published>2024-06-17T00:00:00Z</published>
        <updated>2024-06-17T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Returning multiple values from a function using tuples. Understand the syntax and how to write correct type annotations.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/how-to-recursively-create-directories/</id>
        <link href="https://bugfactory.io/articles/how-to-recursively-create-directories/"/>
        <title>How to Recursively Create Directories</title>
        <published>2024-06-12T00:00:00Z</published>
        <updated>2024-06-12T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Creating directories in Python using the `pathlib` module, including normal and recursive creation, handling existing directories, and file system permissions.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/the-builtin-hasattr-getattr-setattr-and-delattr-functions/</id>
        <link href="https://bugfactory.io/articles/the-builtin-hasattr-getattr-setattr-and-delattr-functions/"/>
        <title>The Built-In `getattr()`, `hasattr()`, `setattr()`, and `delattr()` Functions</title>
        <published>2024-06-10T00:00:00Z</published>
        <updated>2024-06-10T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Exploring working with instance variables and customizing attribute access in Python, including the use of `getattr()` and magic methods.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/restarting-uvicorn-workers-with-the-sighup-signal/</id>
        <link href="https://bugfactory.io/articles/restarting-uvicorn-workers-with-the-sighup-signal/"/>
        <title>Restarting `uvicorn` Workers with the `SIGHUP` Signal</title>
        <published>2024-06-05T00:00:00Z</published>
        <updated>2024-06-05T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about process management in Python&#39;s `uvicorn` web server and how to use signals to restart workers and to increment/decrement the number of workers.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/using-the-if-match-header-to-avoid-collisions/</id>
        <link href="https://bugfactory.io/articles/using-the-if-match-header-to-avoid-collisions/"/>
        <title>Using the `If-Match` Header to Avoid Collisions</title>
        <published>2024-06-03T00:00:00Z</published>
        <updated>2024-06-03T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Prevent lost updates in HTTP APIs using `ETag` and `If-Match` headers to block conflicting updates and ensure data integrity.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/showcasing-weak-and-strong-etag-headers-with-fastapi/</id>
        <link href="https://bugfactory.io/articles/showcasing-weak-and-strong-etag-headers-with-fastapi/"/>
        <title>Showcasing Weak and Strong `ETag` Headers with FastAPI</title>
        <published>2024-05-29T00:00:00Z</published>
        <updated>2024-05-29T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Comparison of strong and weak `ETag` headers in HTTP caching, with an example using FastAPI to demonstrate their behavior.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/the-built-in-sorted-function/</id>
        <link href="https://bugfactory.io/articles/the-built-in-sorted-function/"/>
        <title>The Built-In `sorted()` Function</title>
        <published>2024-05-27T00:00:00Z</published>
        <updated>2024-05-27T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Python&#39;s `sorted()` function makes sorting easy and performant, guaranteeing stability and allowing descending order and custom mapping.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/starting-and-stopping-uvicorn-in-the-background/</id>
        <link href="https://bugfactory.io/articles/starting-and-stopping-uvicorn-in-the-background/"/>
        <title>Starting and Stopping `uvicorn` in the Background</title>
        <published>2024-05-22T00:00:00Z</published>
        <updated>2024-05-22T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn how to start and stop `uvicorn` in the background using a randomly selected free port number. Useful for running test suites that require live-webservers.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/the-built-in-chr-and-ord-functions/</id>
        <link href="https://bugfactory.io/articles/the-built-in-chr-and-ord-functions/"/>
        <title>The Built-In `chr()` and `ord()` Functions</title>
        <published>2024-05-20T00:00:00Z</published>
        <updated>2024-05-20T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Discover Python&#39;s built-in functions `chr()` and `ord()` for handling Unicode characters and converting between integers and characters.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/disabling-304-not-modified-in-fastapi-staticfiles/</id>
        <link href="https://bugfactory.io/articles/disabling-304-not-modified-in-fastapi-staticfiles/"/>
        <title>Disabling `304 Not Modified` in FastAPI&#39;s `StaticFiles`</title>
        <published>2024-05-15T00:00:00Z</published>
        <updated>2024-05-15T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Dealing with caching issues in FastAPI&#39;s `StaticFiles` sub-application and a monkey patching workaround to disable caching.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/the-built-in-bin-oct-and-hex-functions/</id>
        <link href="https://bugfactory.io/articles/the-built-in-bin-oct-and-hex-functions/"/>
        <title>The Built-In `bin()`, `oct()` and `hex()` Functions</title>
        <published>2024-05-13T00:00:00Z</published>
        <updated>2024-05-13T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about the Python built-in functions `bin()`, `oct()`, and `hex()` functions for converting integers to binary, octal, and hexadecimal representations.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/function-overloading-with-the-overload-decorator/</id>
        <link href="https://bugfactory.io/articles/function-overloading-with-the-overload-decorator/"/>
        <title>Function Overloading with the `@overload` Decorator</title>
        <published>2024-05-08T00:00:00Z</published>
        <updated>2024-05-08T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Python doesn&#39;t support true function overloading, but can fake it using the `typing` module&#39;s `@overload` decorator.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/the-built-in-min-and-max-functions/</id>
        <link href="https://bugfactory.io/articles/the-built-in-min-and-max-functions/"/>
        <title>The Built-In `min()` and `max()` Functions</title>
        <published>2024-05-01T00:00:00Z</published>
        <updated>2024-05-01T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Python&#39;s `min()` and `max()` functions can take an `iterable` or multiple positional parameters, and support a key parameter for custom comparisons.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/how-to-avoid-conflicts-and-let-your-os-select-a-random-port/</id>
        <link href="https://bugfactory.io/articles/how-to-avoid-conflicts-and-let-your-os-select-a-random-port/"/>
        <title>How to Avoid Conflicts and Let Your OS Select a Random Port</title>
        <published>2024-04-29T00:00:00Z</published>
        <updated>2024-04-29T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn how to have your OS randomly select a port number for your web server to get around the issue of hard-coded ports during development.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/the-built-in-sum-function/</id>
        <link href="https://bugfactory.io/articles/the-built-in-sum-function/"/>
        <title>The Built-In `sum()` Function</title>
        <published>2024-04-24T00:00:00Z</published>
        <updated>2024-04-24T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>In this article, we explore Python&#39;s built-in `sum()` function, its parameters, and some extreme use cases it wasn&#39;t even designed for.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/http-caching-with-last-modified-and-if-modified-since-headers/</id>
        <link href="https://bugfactory.io/articles/http-caching-with-last-modified-and-if-modified-since-headers/"/>
        <title>HTTP Caching with `Last-Modified` and `If-Modified-Since` Headers</title>
        <published>2024-04-22T00:00:00Z</published>
        <updated>2024-04-22T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about timestamp-based caching in HTTP using the `Last-Modified` and `If-Modified-Since` headers, with Python&#39;s FastAPI as an example.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/date-and-time-formatting-according-to-rfc-5322/</id>
        <link href="https://bugfactory.io/articles/date-and-time-formatting-according-to-rfc-5322/"/>
        <title>Date/Time Formatting According to RFC 5322</title>
        <published>2024-04-10T00:00:00Z</published>
        <updated>2024-04-10T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about the custom date/time formatting rules defined in legacy standards like RFC 5322 and how to work with them using Python&#39;s `datetime` module.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/how-to-format-all-json-files-in-a-git-repository/</id>
        <link href="https://bugfactory.io/articles/how-to-format-all-json-files-in-a-git-repository/"/>
        <title>How to Format all JSON Files in a Git Repository</title>
        <published>2024-04-08T00:00:00Z</published>
        <updated>2024-04-08T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Do you struggle with inconsistent JSON formatting across your Git repository? Learn how to reformat everything using Python with this step-by-step guide.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/http-caching-with-etag-and-if-none-match-headers/</id>
        <link href="https://bugfactory.io/articles/http-caching-with-etag-and-if-none-match-headers/"/>
        <title>HTTP Caching with `ETag` and `If-None-Match` Headers</title>
        <published>2024-04-03T00:00:00Z</published>
        <updated>2024-04-03T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn how to use `ETag` and `If-None-Match` headers to limit your web application&#39;s resource consumption by preventing data retransfers.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/calculating-levenshtein-distance-on-the-word-level/</id>
        <link href="https://bugfactory.io/articles/calculating-levenshtein-distance-on-the-word-level/"/>
        <title>Calculating Levenshtein Distance on the Word Level</title>
        <published>2024-04-01T00:00:00Z</published>
        <updated>2024-04-01T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>This article explains how to use the Levenshtein algorithm to compare sentences by looking for word differences instead of character differences.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/encapsulation-private-protected-and-public-members/</id>
        <link href="https://bugfactory.io/articles/encapsulation-private-protected-and-public-members/"/>
        <title>Encapsulation: Public, Protected, and Private Members</title>
        <published>2024-03-27T00:00:00Z</published>
        <updated>2024-03-27T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about encapsulation in Python. This article explains public, protected, and private members and the conventions used to implement them.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/function-definition-with-catch-all-parameters/</id>
        <link href="https://bugfactory.io/articles/function-definition-with-catch-all-parameters/"/>
        <title>Function Definition with Catch-All Parameters</title>
        <published>2024-03-25T00:00:00Z</published>
        <updated>2024-03-25T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn how to use catch-all parameters in Python functions with this guide. Capture excess positional and keyword arguments to make your functions more flexible.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/boolean-operators-and-short-circuiting/</id>
        <link href="https://bugfactory.io/articles/boolean-operators-and-short-circuiting/"/>
        <title>Boolean Operators and Short-Circuiting</title>
        <published>2024-02-28T00:00:00Z</published>
        <updated>2024-02-28T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Fully understand Python&#39;s boolean operators for negation, conjunction, and disjunction. Master operator precedence and short-circuiting.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/the-built-in-any-function/</id>
        <link href="https://bugfactory.io/articles/the-built-in-any-function/"/>
        <title>The Built-In `any()` Function</title>
        <published>2024-02-26T00:00:00Z</published>
        <updated>2024-02-26T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn how to use the built-in `any()` function in Python to determine if any element in an `iterable` is `True`, with implementation and performance insights.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/the-built-in-id-function/</id>
        <link href="https://bugfactory.io/articles/the-built-in-id-function/"/>
        <title>The Built-In `id()` Function</title>
        <published>2024-02-21T00:00:00Z</published>
        <updated>2024-02-21T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about object identities and comparisons in Python. Discover the built-in `id()` function, the `is` and `is not` operators, and more.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/how-to-find-the-first-last-day-of-a-month-from-a-given-date/</id>
        <link href="https://bugfactory.io/articles/how-to-find-the-first-last-day-of-a-month-from-a-given-date/"/>
        <title>How to Find the First/Last Day of a Month from a given Date</title>
        <published>2024-02-19T00:00:00Z</published>
        <updated>2024-02-19T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn how to calculate a month&#39;s first and last days using Python&#39;s built-in `datetime` module, with step-by-step explanations and code examples.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/the-built-in-bool-class/</id>
        <link href="https://bugfactory.io/articles/the-built-in-bool-class/"/>
        <title>The Built-In `bool()` Class</title>
        <published>2024-02-14T00:00:00Z</published>
        <updated>2024-02-14T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about boolean values in Python and the standard truth testing procedure. Understand how objects are converted to `True` or `False`.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/how-to-find-the-first-last-day-of-a-year-from-a-given-date/</id>
        <link href="https://bugfactory.io/articles/how-to-find-the-first-last-day-of-a-year-from-a-given-date/"/>
        <title>How to Find the First/Last Day of a Year from a given Date</title>
        <published>2024-02-12T00:00:00Z</published>
        <updated>2024-02-12T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn how to find the first and last day of a year with Python&#39;s `datetime` module. This article explains step by step what you need to know.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/how-to-serve-a-directory-of-static-files-with-fastapi/</id>
        <link href="https://bugfactory.io/articles/how-to-serve-a-directory-of-static-files-with-fastapi/"/>
        <title>How to Serve a Directory of Static Files with FastAPI</title>
        <published>2024-02-07T00:00:00Z</published>
        <updated>2024-07-23T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn how to serve a static site using FastAPI. Perfect for locally testing statically generated websites, for instance, with `httpie`.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/comparing-strings-using-levenshtein-distance/</id>
        <link href="https://bugfactory.io/articles/comparing-strings-using-levenshtein-distance/"/>
        <title>Comparing Strings using Levenshtein Distance</title>
        <published>2024-02-05T00:00:00Z</published>
        <updated>2024-02-05T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about the Levenshtein distance algorithm, a popular and easy-to-implement way to measure the similarity between two strings.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/function-definition-with-keyword-only-parameters/</id>
        <link href="https://bugfactory.io/articles/function-definition-with-keyword-only-parameters/"/>
        <title>Function Definition with Keyword-Only Parameters</title>
        <published>2024-01-31T00:00:00Z</published>
        <updated>2024-01-31T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about keyword-only parameters in Python, how to define them, and their interplay with position-only parameters.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/function-definition-with-position-only-parameters/</id>
        <link href="https://bugfactory.io/articles/function-definition-with-position-only-parameters/"/>
        <title>Function Definition with Position-Only Parameters</title>
        <published>2024-01-29T00:00:00Z</published>
        <updated>2024-01-29T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about positional parameters in Python and a special syntax that allows functions to declare certain parameters as position-only.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/function-definition-with-default-parameters/</id>
        <link href="https://bugfactory.io/articles/function-definition-with-default-parameters/"/>
        <title>Function Definition with Default Parameters</title>
        <published>2024-01-25T00:00:00Z</published>
        <updated>2024-01-25T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about Python functions with default parameters. Understand how default parameters work and some essential restrictions and evaluation rules.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/the-built-in-callable-function/</id>
        <link href="https://bugfactory.io/articles/the-built-in-callable-function/"/>
        <title>The Built-In `callable()` Function</title>
        <published>2024-01-22T00:00:00Z</published>
        <updated>2024-01-22T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about the `callable()` function in Python. This article explains how everything in Python is potentially callable, including classes and instances.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/function-definition-with-simple-parameters/</id>
        <link href="https://bugfactory.io/articles/function-definition-with-simple-parameters/"/>
        <title>Function Definition with Simple Parameters</title>
        <published>2024-01-17T00:00:00Z</published>
        <updated>2024-01-17T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn about functions with simple parameters in Python, including how the called can decide to use positional or keyword notation.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/function-definition-basics/</id>
        <link href="https://bugfactory.io/articles/function-definition-basics/"/>
        <title>Function Definition Basics</title>
        <published>2024-01-15T00:00:00Z</published>
        <updated>2024-01-15T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Explore Python&#39;s function definition statement and discover its features with this series of articles. Get started with this simple introduction.</summary>
      </entry>
      <entry>
        <id>https://bugfactory.io/articles/the-built-in-all-function/</id>
        <link href="https://bugfactory.io/articles/the-built-in-all-function/"/>
        <title>The Built-In `all()` Function</title>
        <published>2024-01-08T00:00:00Z</published>
        <updated>2024-01-08T00:00:00Z</updated>
        <author><name>Christoph Schiessl | BugFactory</name><email>cs@bugfactory.io</email></author>
        <summary>Learn how to use the built-in `all()` function in Python for boolean logic, with examples and different implementations.</summary>
      </entry>
</feed>