DeepDiff: The Swiss Army Knife for Data Comparison in Python

Posted on Fri, 20 Feb 2026 in Python • Tagged with python, data, cli, tools, diff

When working with structured data in Python, we often need to compare two dictionaries, JSONs, or complex objects to find out what has changed. While direct comparison (==) is useful, sometimes we need to understand exactly what is different: which keys were added, which were removed, or where values have changed …


Continue reading

Shot-scraper: Automated Web Screenshots

Posted on Fri, 20 Feb 2026 in Python • Tagged with python, cli, tools, web, scraping, screenshots

Have you ever needed to take screenshots of a web page programmatically? Perhaps to document your project, monitor UI changes, or generate images for social media. There are many ways to do it, but shot-scraper stands out for its ease of use and power.

Created by Simon Willison, shot-scraper is …


Continue reading

Pandas Styler: Improve the Presentation of your DataFrames

Posted on Thu, 25 Dec 2025 in Programming • Tagged with pandas, python, data-science, visualization, style

Discover how the Pandas Styler object allows you to apply conditional formatting and CSS styles to your DataFrames for better data visualization and presentation.


Continue reading

Reduce Noise in Your Python Logs: A Smart Approach

Posted on Thu, 25 Dec 2025 in Programming • Tagged with python, logging, logs, debugging, development

Learn how to configure Python's logging module to avoid message overload from third-party libraries, keeping your logs clean and useful.


Continue reading

Poe the Poet: Automating Tasks in Python Projects with uv

Posted on Thu, 25 Dec 2025 in Programming • Tagged with python, uv, poethepoet, automation, pyproject.toml

Discover how Poe the Poet allows you to define and execute custom commands directly from your pyproject.toml, optimizing your workflow in uv environments.


Continue reading

HTTPX: Modern HTTP Client for Python

Posted on Mon, 23 Sep 2024 in Programming • Tagged with python, http, httpx, async, requests

HTTPX emerges as the natural successor to requests, offering async support, HTTP/2, and a modern API for contemporary Python applications.


Continue reading

About Versions

Posted on Mon, 01 May 2017 in Programming • Tagged with python


Continue reading

Python: Create Repeating Generators

Posted on Tue, 09 Feb 2016 in Python • Tagged with python, generators, itertools, decorators, yield

Techniques in Python to create generators that can be iterated multiple times, overcoming the "one-shot" limitation of standard generators


Continue reading

Repeating a function with threads

Posted on Sun, 03 May 2015 in Programming • Tagged with python

Let's use threads in python to periodically execute a function


Continue reading

Install InSync on Opensuse

Posted on Mon, 20 Apr 2015 in Systems • Tagged with django, python


Continue reading

Google Code is Closing

Posted on Fri, 13 Mar 2015 in Programming • Tagged with python

As I said, Google announced the closure of Google Code.

Today I received the email notifying me (I had a test project hosted there) that I could move my projects simply to github, the de facto repository for free software today (sorry for bitbucket and especially for mercurial).

Its interface …


Continue reading

Blogging again

Posted on Fri, 20 Feb 2015 in Personal • Tagged with python

I am writing again.


Continue reading

Ajax view decorator

Posted on Fri, 21 Nov 2014 in Programming • Tagged with python, django

To force a django view to be called only via AJAX calls.

def ajax_required(f):
    """
    AJAX request required decorator
    use it in your views:

    @ajax_required
    def my_view(request):
        ....

    """
    def wrap(request, *args, **kwargs):
        if not request.is_ajax():
            return HttpResponseBadRequest()
        return f(request, *args, **kwargs)
    wrap.__doc__ = f.__doc__
    wrap.__name__ …

Continue reading

Generic function to use as upload_to

Posted on Sat, 11 Oct 2014 in Programming • Tagged with django, python

FileFields in Django need an upload_to function that determines where the file will be uploaded. I usually have a generic function in utils.py that leaves them in a subfolder with the model name.

import os

def generic_upload_to(instance, filename):
    """
    Generic `upload_to` function for models.FileField and models.ImageField
    which …

Continue reading

Django: links in object list

Posted on Wed, 21 May 2014 in Programming • Tagged with django, python

In my projects I usually use links to related items in the admin change_list.

utils.py

I have this in utils.py

from django.contrib import admin
from django.contrib.contenttypes.models import ContentType
from django.core import urlresolvers
from django.utils.datastructures import SortedDict …

Continue reading

Settings vars processor

Posted on Wed, 08 Jan 2014 in Programming • Tagged with python, django

I usually use this at the beginning of projects.

from django.conf import settings as django_settings
from django.core.exceptions import ImproperlyConfigured


def settings(request):
    """
    Adds the settings specified in settings.TEMPLATE_VISIBLE_SETTINGS to
    the request context.
    """
    new_settings = {}
    for attr in django_settings.TEMPLATE_VISIBLE_SETTINGS:
        try:
            new_settings[attr] = getattr(django_settings, attr)
        except AttributeError …

Continue reading