Pages

Topics

Tools

↑↓navigate↵openescclose

Python guides

Every published Python guide, newest first, with practical examples you can copy into your own project.

3,965 guides across 14 topics

Topics

Latest Python guides

A visual representation of fuzzy string matching using RapidFuzz functions, showing similarity scores between text samples.
Python

Python RapidFuzz: ratio, partial_ratio, and token_sort_ratio

RapidFuzz provides three main fuzzy matching scores in Python: ratio, partial_ratio, and token_sort_ratio. See how they differ and when to use each.

RapidFuzzfuzzy matchingstring similarityPython
Illustration of two text strings being compared with a similarity score using RapidFuzz in Python
Python

Python RapidFuzz Fuzzy String Matching

python rapidfuzz fuzzy string matching: Learn how to use RapidFuzz for fast fuzzy string matching in Python, including ratio functions, tokenization, and process extra...

rapidfuzzfuzzy matchingstring similaritypython
Illustration comparing Python timedelta and relativedelta for date arithmetic, showing calendar months versus fixed durations.
Python

Python timedelta vs relativedelta: When to Use Each

python timedelta vs relativedelta: Compare Python's timedelta and dateutil's relativedelta for date arithmetic: understand calendar-aware differences, month-end behavi...

datetimedateutildate arithmeticcalendar arithmetic
A calendar grid with overlapping clock faces and timezone markers illustrating timezone-aware recurrence scheduling in Python.
Python

Python dateutil: Timezone and rrule Recurrence

Understand how dateutil rrule uses timezone-aware datetimes, handles DST transitions, and avoids naive and aware datetime mistakes.

dateutiltimezonerrulerecurrence
A calendar icon with circular month arrows and a small scale showing uneven day lengths, illustrating calendar-aware date arithmetic with relativedelta.
Python

Python Dateutil Relativedelta Date Arithmetic

Use Python's dateutil relativedelta for calendar-aware date arithmetic: adding months, handling month-end clamping, computing calendar differences, and combining it with timedelta.

relativedeltadateutildate arithmeticdatetime
Illustration of a calendar icon with a clock and a Python code snippet showing dateutil parsing.
Python

Python dateutil: Parsing Dates and Datetimes from Strings

Learn how to use dateutil.parser.parse to turn flexible date and datetime strings into Python datetime objects. Covers timezone handling, ambiguity flags, fuzzy parsing, and when to use strptime.

dateutildatetime parsingdate parsingtimezone handling
Comparison of Python Arrow and Pendulum datetime libraries showing two clocks with different styles.
Python

Python Arrow vs Pendulum: Choosing a Datetime Library

Compare Arrow and Pendulum for Python datetime handling: API differences, timezone support, performance, and when to choose each.

PythondatetimeArrowPendulum
An illustration of a calendar with an arrow pointing forward and a speech bubble showing relative time text, representing Arrow's shift and humanize methods.
Python

Python Arrow Humanize and Shift

Learn how to use Arrow's humanize and shift methods to format relative time and perform calendar-aware date adjustments in Python, with practical examples and edge cases.

arrowdatetimehumanizeshift
Illustration of a clock with timezone arrows pointing to different world cities, representing Arrow's timezone conversion.
Python

Python Arrow: Datetime Parsing, Formatting, and Timezone

Learn how to parse, format, and convert timezones with Python Arrow. Includes code examples, timezone edge cases, and dependency considerations.

Arrowdatetimetimezoneparsing
Comparison of Python datetime and Pendulum libraries showing timezone and date manipulation.
Python

Python Pendulum vs Datetime: Which Should You Use?

Compare Python's Pendulum library with the standard datetime module for timezone handling, parsing, formatting, arithmetic, and migration considerations.

pythondatetimependulumtimezone