semvec/pypi-packages huggingface dataset:
datarm 1.1.4
Data Relation Mapping framework for Python.
License: MIT
Keywords: SQLAlchemy,ORM

# DataRM
Data Relation Mapping framework for Python, Based on [SQLAlchemy](https://www.sqlalchemy.org/).

DataRM is designed to be the simplest way to get object based data models, and requires a very minimal learning curve.

[![coverage report](https://gitlab.com/kiwi-ninja/datarm/badges/master/coverage.svg)](https://gitlab.com/kiwi-ninja/datarm/commits/master)

[![pipeline status](https://gitlab.com/kiwi-ninja/datarm/badges/master/pipeline.svg)](https://gitlab.com/kiwi-ninja/datarm/commits/master)

## Docs

The documentation is public, and is generated using Sphinx.

[DataRM Documentation](https://kiwi-ninja.gitlab.io/datarm)



## Simple Example
``` python
from datarm import Model, Database

Base = Model()

class Animal(Base):
    name: str
    age: int

db = Database("sqlite:///:memory:") # use an in-memory SQLite database
db.create(Animal)  # Create the `Animal` table in the database

bea = Animal(name="bea", age=5)

session = db.session()
session.create(bea) # Create a row in the `Animal` table

print(session.query(Animal).filter(Animal.name == "bea").one())

session.commit() # commit the session to the database
```

``` text
$ python example.py
>>> Animal(name='bea', age=5)
```