Category Archives: Python

Python – NumPy

By | 09/10/2024

In this post, we will see what NumPy is and how we can use it in our Python projects.NumPy is an open-source Python library that provides support for large, multi-dimensional arrays and matrices, along with a vast collection of high-level mathematical functions to operate on these arrays efficiently. It is the foundational package for scientific… Read More »

Python – Decorators

By | 25/09/2024

In this post, we’ll see what Decorators are, look at some built-in decorators, and see how to create our own custom decorator.But first of all, what is a Decorator?“A decorator is a design pattern in Python that allows us to add new functionality to our existing object without modifying its structure. Decorators are implemented as… Read More »

Python – Management of a PostgreSQL database

By | 28/08/2024

In this post, we will see what PostgreSQL is and how to use it in Python.PostgreSQL, often referred to as Postgres, is a powerful, open-source object-relational database system with a strong reputation for reliability, feature robustness, and performance. It has been in active development for over 30 years, making it a highly mature database choice.… Read More »

Python – How to manage a XML file

By | 22/05/2024

In this post, we will see how to manage a XML in Python using the “xml.etree.ElementTree” module.The “xml.etree.ElementTree” module is part of Python’s standard library, offering a simple and effective way to work with XML data. This module supports parsing XML from strings or files, navigating and searching the XML tree, and modifying or creating… Read More »

Python – Virtualenv

By | 24/04/2024

In this post, we will see how to use Virtualenv in our Python projects.But first of all, what is Virtualenv?Virtualenv is a tool to create isolated Python environments and it is useful when we need to work with specific version of libraries/packages, without affecting other projects.We start installing Virtualenv with the command: IMPORTANT: currently, I… Read More »

Python – Dockerizing a FastAPI application

By | 27/03/2024

In this post, we will see how to dockerizing the FastAPI application that we created in this previous post. First of all, we create a requirement.txt file where we will insert all libraries that we need to install to use the application: [REQUIREMENTS.TXT] Then, we create the dockerfile: [DOCKERFILE] Finally, to avoid unnecessarily copying everything… Read More »

Python – Fast API

By | 14/02/2024

In this post, we will see how to create a web API to manage all CRUD operations for a class called User, using FastAPI.But first of all, what is FastAPI?From the official web site:FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints.The key features… Read More »

Python – CRUD operations in Redis

By | 31/01/2024

In this post, we will see how to implement CRUD operations for an ‘User’ object in Redis, defines as follows: Before to start, I want to remember that REDIS (Remote Dictionary Server), is an open-source, in-memory data structure store, used as a database, cache, and message broker. It supports various data structures such as strings,… Read More »