🎉 svc-infra v1.0 is here — Production-ready backend infrastructure
What's new
nfrax logonfrax

Infrastructure that just works. Ship products, not boilerplate.

Frameworks

  • svc-infra
  • ai-infra
  • fin-infra
  • robo-infra

Resources

  • Getting Started
  • What's New
  • Contributing

Community

  • GitHub

© 2026 nfrax. All rights reserved.

nfrax logonfrax
Start HereWhat's New
GitHub
svc-infra / API Reference

SqlRepository

from svc_infra.db.sql.repository import SqlRepository
View source
svc_infra.db.sql.repository

Very small async repository around a mapped SQLAlchemy model.

Constructor
SqlRepository(model: type[Any], id_attr: str = 'id', soft_delete: bool = False, soft_delete_field: str = 'deleted_at', soft_delete_flag_field: str | None = None, immutable_fields: set[str] | None = None)
ParameterTypeDefaultDescription
modelrequiredtype[Any]——
id_attrstr'id'—
soft_deleteboolFalse—
soft_delete_fieldstr'deleted_at'—
soft_delete_flag_fieldstr|NoneNone—
immutable_fieldsset[str] |NoneNone—

Methods

On This Page

Constructorcountasynccount_filteredasynccreateasyncdeleteasyncexistsasyncgetasynclistasyncsearchasyncupdateasync