Pandas Styler: Improve the Presentation of your DataFrames

Posted on Thu 25 December 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 December 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 December 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 September 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 February 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 April 2015 in Systems • Tagged with django, python


Continue reading

Google Code is Closing

Posted on Fri 13 March 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 February 2015 in Personal • Tagged with python

I am writing again.


Continue reading

Ajax view decorator

Posted on Fri 21 November 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 October 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 January 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