Manejando datos

SQLAlchemy, a Python ORM for databases

Posted by in Databases, Python

I haven’t talked about Python for a long time, not because I don’t have things to tell, but because I’ve been focused on what I’ve already explained here, and I haven’t expanded on other fields. In today’s post, I present SQLAlchemy, a powerful Python library for working with relational databases. The basic concept is the antipode to what I have always done (I still have to rethink this new way of programming): The use of normal Python objects to represent database tables and query execution There are a number of…read more

Export your data from Endomondo

Posted by in Python

I started to run for more than two years now, once or twice a week, and although at the beginning I didn’t use any app for register my activities, I began to do ir with Endomondo app, the app that I like the most for that, and specially for their statistics. Now I don’t use it for registering my activity because I am now using a GPS watch. Although Endomondo is a great app, maybe you are interested in collecting your data. I remark your data because you should verify…read more

Moving from Python 2 to Python 3

Posted by in Python

Long ago, I wrote an entrance related to how to install Python 2 and Python 3 on the same Windows machine. But … Are those changes so important that both versions have compatibility problems? The answer is yes. A change in the print statement print “hola” from Python 2.x is noew print(“Hola”) in Python 3.x. as a matter of fact, there is some incompatibilities. In order to help you when migrating, the web python3porting.com can help you a lot, where you can read the best way to migrate to version…read more

Trying Django, part 3

Posted by in Frameworks, Python

Part 3 of the framework Django (here you have part 1, and part 2), after preparing a virtual environment, download Django and created the app and the super user that allow you access to the back end of the app. Today’s tras preparar el entorno virtual, descargar django y crear la aplicación y el super usuario para disponer de acceso al backend. Hoy conocemos un poco mejor los archivos que se han generado en el proyecto, que son: __init__.py This file is empty, but it’s the one that allow yo…read more

Trying Django, part 2

Posted by in Python

Second part of Trying Django, a Python framework for web development. Here you have part 1, where we created a virtual environment and also downloaded the django package. Because you need to activate the environment several times while developing, I have created a script file under MS-DOS to make this task easy. This is the script code running: : Si por casualidad has instalado o tienes instalada django, pero no te acuerdas de la versión, sólo tienes que escribir python -m django –version para ver qué versión tienes instalada, tal…read more