Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git-backed ORM for Python?

While looking for information about versioned databases, I came across the gitmodel project for Ruby, which is a versioned ORM on top of git.

There are a few projects I'm involved in that could benefit from some sort of versioned data store, and Git seems like a natural solution in this space. Our team is already familiar both with the git command line tools and the use of programmatic interfaces to git, such as dulwich, so something like gitmodel would play to our existing experience.

Is there anything similar available for Python?

like image 728
larsks Avatar asked May 03 '12 15:05

larsks


People also ask

Does Python have ORM?

Here is a basic example with Django ORM: There are several open-source ORMs in different programming languages such as Django ORM (Python), Laravel Eloquent (PHP), Sequelize (JavaScript), etc.

What are ORM libraries in Python?

SQLAlchemy is a library that facilitates the communication between Python programs and databases. Most of the times, this library is used as an Object Relational Mapper (ORM) tool that translates Python classes to tables on relational databases and automatically converts function calls to SQL statements.

What is tortoise in Python?

Introduction. Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper) inspired by Django. Tortoise ORM was built with relations in mind and admiration for the excellent and popular Django ORM. It's engraved in its design that you are working not with just tables, you work with relational data.


1 Answers

Ignacio Vazquez-Abrams pointed me towards the django-versions package, which while not based on git does offer a good model for storing versioned data. I haven't had the opportunity to work with Django before, but this look as if it may be the best available option right now.

According to the documentation this may not work with the latest version of Django (the documentation says it requires 1.1.x, while Django is up to 1.4 for realz and 1.3 in my distribution's package repository). I guess I'll look at it as a learning experience and see how much work is required to integrate it with more recent Django releases...

like image 101
larsks Avatar answered Oct 07 '22 05:10

larsks