Skip to content

feat(fastapi): include all models in aurweb.models package

Kevin Morris requested to merge kevr/aurweb:models-package-includes-all into pu

This gives developers the ability to import models without importing them directly from their module:

from aurweb.models import Ban, AccountType

This provides more conciseness:

from aurweb import models

def some_func(ban: models.Ban):
    pass

def some_other_func(user: models.User):
    pass

This more aligns with a Django-style of core model bases.

Signed-off-by: Kevin Morris kevr@0cost.org

Edited by Kevin Morris

Merge request reports

Loading