Tag: Python

Using Python and MySQL in the ETL Process: Using Python and SQLAlchemy

In the previous two articles of this series, we discussed how to use Python and SQLAlchemy to perform the ETL process. Today we’ll do the same, but this time using Python and SQL Alchemy without SQL commands in textual format. This will enable us to use SQLAlchemy regardless of the database engine we’re connected to. So, let’s start. Today we’ll discuss how to perform the ETL process using Python and SQLAlchemy.

Using Python and MySQL in the ETL Process: SQLAlchemy

SQLAlchemy helps you work with databases in Python. In this post, we tell you everything you need to know to get started with this module. In the previous article, we talked about how to use Python in the ETL process. We focused on getting the job done by executing stored procedures and SQL queries. In this article and the next, we’ll use a different approach. Instead of writing SQL code, we’ll use the SQLAlchemy toolkit.

Using Python and MySQL in the ETL Process

Python is very popular these days. Since Python is a general-purpose programming language, it can also be used to perform the Extract, Transform, Load (ETL) process. Different ETL modules are available, but today we’ll stick with the combination of Python and MySQL. We’ll use Python to invoke stored procedures and prepare and execute SQL statements. We’ll use two similar-but-different approaches. First, we’ll invoke stored procedures that will do the whole job, and after that we’ll analyze how we could do the same process without stored procedures by using MySQL code in Python.

Merging Multiple User Accounts

.KeyLearning { max-width: 90%; padding: 20px 20px 5px 30px; margin: 40px auto; background-color: #e0e0e0; border: 0px solid #360063; border-radius: 8px; -webkit-border-radius: 8px; -moz-border-radius: 8px; -khtml-border-radius: 8px; } .KeyLearning .KeyLearningTitle { font-size: 1.125em; font-weight: bold; margin-top: 0px; } Social media surrounds us, so it’s not unusual for applications to require some kind of social media integration. The most common issigning in with Facebook, Twitter, or another service. Users expect to be able to log in with different social accounts.

How to Store Authentication Data in a Database. Part 4

Handling user registration and authentication isn’t an easy task. Both users and developers understand this. Users have to select and remember another username and password (taking into account different password policies, of course). A developer’s responsibility is to make this process secure and to properly protect the user’s data. So it’s no surprise that logging in with one account – Facebook or Google, for example – is extremely popular.

ORMs Under the Hood

It often happens that if something is loved, it is also hated with the same power. The idea of object relational mapping fits into this concept perfectly. You will definitely come across many opposite points and fierce discussions as well as unwavering advocates and haters. So if you have ever asked whether to use ORM or not, the answer “it depends” will not be enough. What Is an Object-Relational Mapping (ORM)?

Playing Around With Python in PostgreSQL

I’m kind of guy who likes to make jokes or take some ideas ad absurdum. It may looks useless, but examination of extremes helps me appreciate the middle way. Some time ago I was heavily infected by an idea: “let’s ditch the server side” (see my article: Do we still need server side programming?). The “PostgreSQL as an Application Server” idea was born then. My Vertabelo colleagues insisted that I should write an article about it.

Setting up a Local Development Environment

How This Tutorial Is Organized The tutorial is divided into four articles: Introduction – Dive into web development with Flask. This article explains the basics of web development with Flask Part I – Setting up a local development environment (You are here) Step 1: Create virtual environment for all required dependencies Step 2: required packages: Flask, psycopg2, SQLAlchemy Step 3: Create requirements.txt file with all dependencies listed Step 4: Install PostgreSQL 9.

Flask Web-App Development. Part III: Deployment to Heroku

How This Tutorial Is Organized The tutorial is divided into four articles: Introduction – Dive into web development with Flask. This article explains the basics of web development with Flask Part I – Setting up a Local Development Environment Step 1: Create virtual environment for all required dependencies Step 2: required packages: Flask, psycopg2, SQLAlchemy Step 3: Create requirements.txt file with all dependencies listed Step 4: Install PostgreSQL 9.

Flask Web-App Development. Part II: Application Development

How This Tutorial Is Organized The tutorial is divided into four articles: Introduction – Dive into web development with Flask. This article explains the basics of web development with Flask Part I – Setting up a local development environment Step 1: Create virtual environment for all required dependencies Step 2: required packages: Flask, psycopg2, SQLAlchemy Step 3: Create requirements.txt file with all dependencies listed Step 4: Install PostgreSQL 9.

Flask Web Application Development. Introduction

How This Tutorial Is Organized The tutorial is divided into four articles: Introduction – Dive into web development with Flask. This article explains the basics of web development with Flask (You are here) Part I – Setting up a local development environment Step 1: Create virtual environment for all required dependencies Step 2: required packages: Flask, psycopg2, SQLAlchemy Step 3: Create requirements.txt file with all dependencies listed Step 4: Install PostgreSQL 9.

How to Generate Flask-SQLAlchemy Models Using Vertabelo

Flask is a web microframework for Python. It uses Flask-SQLAlchemy for object relational mapping. It is a Flask wrapper for SQLAlchemy – a powerful relational database framework that offers a high level ORM and low level access to a database’s native SQL functionality. For each database table, SQLAlchemy uses a regular Python class with attributes that match the columns of a corresponding database table. The database instance from Flask-SQLAlchemy provides a base class for models called db.

Visual Design of SQLAlchemy Models in 6 Steps

In this article I’m going to show you how to design SQLAlchemy models using Vertabelo, an online tool for visual database design, and our code generator. SQLAlchemy is propably the most advanced and well engineered OR/M for Python, while Vertabelo is a database design tool that works in a web browser. The Vertabelo code generator is an pythonic script called vertabelo-sqlalchemy. As you can see, the script is open source and hosted on GitHub.

Can Python Help You Win Scrabble?

It is hard to find someone who doesn’t know how to play Scrabble. In case someone isn’t familiar with the game, here’s a quick explanation: Scrabble is played by two to four players on a square board with a 15×15 grid of cells, each of which accommodates a single letter tile. The board is marked with “premium” squares, which multiply the number of points awarded; each letter tile has its own assigned numeric score.