Skip to content

ORMagic ORMagic

GitHub License Tests Codecov PyPI - Python Version PyPI - Version Code style: black Linting: Ruff Pydantic SQLite Pytest Material for MkDocs

The main goal of ORMagic is to provide a simple and easy-to-use ORM for Python, that is easy to understand and use, while still providing the necessary features to interact with a database. Is based on the Pydantic model and extends it with the ability to interact with SQLite database.

Simple example

from ormagic import DBModel

class User(DBModel):
    name: str
    age: int

User.create_table()

User(name="John", age=30).save()

User.get(name="John")
>>> User(id=1, name='John', age=30)