Coding

12 Best Free and Open Source Python Object-Relational Mapping Software

Object–relational mapping (ORM) is a programming technique for converting data between incompatible type systems using object-oriented programming languages. This creates, in effect, a “virtual object database” that can be used from within the programming language.

In essence, ORM is a design pattern for converting (wrapping) that data stored within a relational database into an object that can be used within an object oriented language. It creates a layer between the language and the database, helping programmers work with data without the OOP paradigm.

Compared to traditional techniques of exchange between an object-oriented language and a relational database, ORM often reduces the amount of code that needs to be written. It standardizes interfaces reducing boilerplate and speeding development time. Advocates of ORMs claim they increase productivity, improve application design, reuse code and maintain the application over time. On the other hand, ORM suffers the disadvantage of the abstraction obscuring what’s happening in the code. And over-use of ORM software can produce poorly designed databases.

There is a good range of Python-based ORM software available. Here’s our verdict summarized in a legendary LinuxLinks-style ratings chart. Only free and open source software is eligible for inclusion.

Ratings chart

Let’s explore the 12 ORM tools for Python. For each program we have compiled its own portal page, a full description with an in-depth analysis of its features, together with links to relevant resources.

Python Object-Relational Mapping Software
DjangoHigh-level web application framework that has a powerful ORM
SQLAlchemyPython SQL Toolkit and Object Relational Mapper
PeeweeSimple, small and expressive Object Relational Mapper. It has few concepts
SQLModelCombines database models with type-safe data validation
TortoiseEasy-to-use asyncio ORM inspired by Django
PonyBilled as the smartest Python ORM
PiccoloAsync-first database toolkit with migrations and a powerful query API
SQLObjectForms a part of many applications including TurboGears
ormarBuild expressive async database models with minimal boilerplate
EdgyModern async database layer focused on simplicity and flexibility
SaffierLightweight async data modelling with support for multiple databases
StormDesigned to work with thin relational databases and big systems

This article has been updated to reflect the changes outlined in our recent announcement.

Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted