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.
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.
Hosting applications in the Cloud has become the most popular method of application since it offers great flexibility and is relatively simple to set up. This model earned a formal name known as Platform as a Service (PaaS). In a PaaS model the service provider offers a fully managed platform in which a web application is uploaded and deployed. Most PaaS providers offer to scale an application by adding or removing servers.
In the part II of TODO app development I'm going to show database model, create the initial database, prepare Flask-SQLAlchemy models, define view functions, templates and finally beautify webapp with Bootstrap.
Part I of TODO app web development presents initial steps to set up a local development environment. It includes creating a virtual environment for all required dependencies and organizing the structure of an application.
The aim for this tutorial is to build a simple TODO web application using Flask microframework, SQLalchemy, PostgreSQL 9.3 and Vertabelo, and finally to deploy our existing app to the Heroku cloud. Before we dive into real application development, we will touch on some of the principles associated with web development.
Flask-SQLAlchemy is a Flask wrapper for SQLAlchemy – a powerful relational database framework that offers a high level ORM and low access to a database’s native SQL functionality. Now, you can generate Flask-SQLAlchemy classes using Vertabelo and vertabelo-flask script.
SQLAlchemy is propably the most advanced and well engineered ORM for Python. Therefore, its integration with Vertabelo was only a matter of time. And it has just happened! We issued a code generator which allows you to convert your database models created with Vertabelo to SQLAlchemy models for further software development.