Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.22 KB

README.md

File metadata and controls

51 lines (38 loc) · 1.22 KB

DBModel

Code style: black pre-commit

Utils and wrappers for SQLAlchemy.

Installation

pip install git+https://github.com/adhtruong/dbmodel

Usage

from db_model import DBModel, PrimaryKey


class MyModel(DBModel):
    """Defined table of my_model with primary key id and name column."""

    id: PrimaryKey[int]
    name: str

TODO

  • Add documentation
  • Add testing
  • Add main decorator
  • Allow better configuration
  • Improve mypy plugin
    • Intercept dataclass transformer so descriptor can be transformed before generating init.
  • Make pip installable

Development Set Up

    pip install -r requirements-dev.txt
    pre-commit install