Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

anvilistas/anvil-orm

Repository files navigation

This project has been superseded by the persistence module of Anvil Extras and should no longer be used.

Anvil ORM

A library for Anvil Applications that provides Object Relational Mapping (ORM) functionality.

Using this library, you can write simple classes such as:

@model_type
class Person:
    first_name = Attribute()
    last_name = Attribute()

and then use that class to create new Person instances, save them to a data table, fetch them back and update them with code as simple as:

from .model import Person

person = Person(first_name="Owen").save()

person.last_name = "Campbell"
person.save()

people = Person.search()

And you can do that in both client and server side code!

Credits

The development of this library was partly funded by Nanovare and Osmosis Investment Management

Documentation

Installation and usage instructions are at Readthedocs