Skip to content

Instantly share code, notes, and snippets.

View mariocj89's full-sized avatar

Mario Corchero mariocj89

View GitHub Profile
@mariocj89
mariocj89 / python-logging.md
Last active April 13, 2024 13:15
Understanding logging in Python

Logging trees

Introduction

When applications are running in production, they become black boxes that need to be traced and monitored. One of the simplest, yet main, ways to do so is logging. Logging allows us - at the time we develop our software - to instruct the program to emit information while the system is running that will be useful for us and our sysadmins.

@mariocj89
mariocj89 / python-datetime.md
Last active April 2, 2023 16:43
Draft for an article in opensource.com related to a talk in PyCon17

Intro

Most of us have faced a point when trying to make things work with the Python datetime module where we resort to guess-and-check until the errors go away. datetime is one of those APIs that seems easy to use but requires the developer to have a deep understanding of what things actually mean, as otherwise it is really easy to introduce unexpected bugs given the actual complexity of date and time related issues.

Time Standards

The first concept we need to grasp when working with time is