SQLAlchemy Expression Language, Advanced Usage

Expression Language One of the core components of SQLAlchemy is the Expression Language. It is allows the programmer to specify SQL statements in Python constructs and use the constructs directly in more complex queries. Since the expression language is backend-neutral and comprehensively covers every aspect of raw SQL, it is closer to raw SQL than […]

Read More

Understanding Python SQLAlchemy’s Session

What are SQLAlchemy Sessions? What does the Session do? One of the core concepts in SQLAlchemy is the Session. A Session establishes and maintains all conversations between your program and the databases. It represents an intermediary zone for all the Python model objects you have loaded in it. It is one of the entry points […]

Read More

SQLAlchemy Association Tables

Association Tables In our previous articles, we used an association table to model many-to-many relationships between tables, such as the relationship between Department and Employee. In this article, we are going to dive deeper into the association table concept and see how we can use it to further solve more complicated problems. DepartmentEmployeeLink and Extra […]

Read More

SQLAlchemy ORM Examples

ORM Recap In one of the previous articles, we briefly went through an example database with two tables department and employee where one department can have multiple employees and one employee can belong to arbitrary number of departments. We used several code snippets to demonstrate the power of SQLAlchemy’s expression language and show how to […]

Read More

SQLAlchemy – Some Commonly Asked Questions

Common Questions Before we dive deeper into SQLAlchemy, let’s answer a possible list of questions regarding the ORM: Can you prevent SQLAlchemy from automatically creating a schema? Instead, can you bind SQLAlchemy models to an existing schema? Is there a performance overhead when using SQLAlchemy, compared to writing raw SQL? If so, how much? If […]

Read More

Overview of SQLAlchemy’s Expression Language and ORM Queries

Overview In the previous article, we made a comparison between SQLAlchemy and other Python ORMs. In this article, we are going to take a deeper look at SQLAlchemy’s ORM and Expression Language and use an example to showcase their empowering API and easy-to-understand Python structures. Not only does the SQLAlchemy ORM provide a way to […]

Read More

Python for Android: Android’s Native Dialogs (SL4A)

Android has a range of built-in dialogs that allow apps to interact with users. They can be used to display things like spinners and progress bars, and can be used to prompt the user for some kind of input, like a date or string. All of the methods for creating dialogs live in SL4A’s UI […]

Read More

Using Python Django’s ModelForm in Your First Django Application

Django’s ModelForm In our previous article, How to Use Python Django Forms, we learned how to create Django form objects and use them inside templates for common tasks such as data validation and HTML generation. In this article, we are going to learn how to use Django’s ModelForm to create forms directly from models. Compared […]

Read More

How to Use Python Django Forms

Django Form What is a HTML form? What kind of use cases does it have? A webform, web form or HTML form on a web page allows a user to enter data that is sent to a server for processing. Forms can resemble paper or database forms because web users fill out the forms using […]

Read More

Package Your Python Django Application into a Reusable Component

Save Time by Writing and Using Reusable Python Django Apps It’s not trivial to design, develop and maintain a web application. Lots of features and aspects have to be handled properly in order for a web application to succeed. To name a few, the features that are common to almost every web application are user […]

Read More