Frankfurt¶
Frankfurt is an Object-Relational Mapping (ORM) library, built on top of asyncpg. It takes ideas from Django, SQLAlchemy and tortoise-orm.
Source and issue tracker are available at https://github/jorgeecardona/frankfurt/
I will try to support Python >= 3.6. I usually work with 3.7, then, if I run into problems with 3.6 I would remove it.
Introduction¶
Frankfurt is an ORM built on top of asyncpg, henceo, it supports only PostgreSQL.
I am taking ideas from Django, SQLAlchemy and tortoise-orm to built this.
Quickstart¶
As expected, a model can be defined as follows:
>>> from frankfurt.models import Model
>>> from frankfurt import fields
>>>
>>> class FirstModel(Model):
... text = fields.CharField(max_length=200)
>>>
>>> m = FirstModel(text='example')
>>> m.text
'example'