Category Archives: Python

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 – How to manage a XML file »

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 – Virtualenv »

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 – Dockerizing a FastAPI application »

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: Python – CRUD operations in Redis »

Python – Management of a MongoDB database

By | 06/12/2023

In this post, we will see how to manage a MongoDB database with Python using pymongo.In detail, we will perform the CRUD operations on a document called ‘User’ defined as follows: We start writing a Docker-compose file to create a docker container, with an instance of MongoDB: If we run it, the following will be… Read More: Python – Management of a MongoDB database »

Python – Management of a SQLServer database

By | 15/11/2023

In this post, we will see how Python can seamlessly integrate with SQL Server to perform various tasks, from connecting to the database and executing SQL queries to performing advanced data analysis and visualization.In the past , we have already seen how to connect to SQL Server with python but, it was only an introduction… Read More: Python – Management of a SQLServer database »