🎉 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

NoSqlRepository

from svc_infra.db.nosql.repository import NoSqlRepository
View source
svc_infra.db.nosql.repository

Very small async repository for Mongo-like document stores (Motor). Mirrors SqlRepository capabilities: - list / count / get / create / update / delete - optional soft delete with timestamp + flag field - search (regex OR across fields) - exists(filter) - basic sort support (list of (field, direction) tuples: 1 or -1)

Constructor
NoSqlRepository(collection_name: str, id_field: 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
collection_namerequiredstr——
id_fieldstr'_id'—
soft_deleteboolFalse—
soft_delete_fieldstr'deleted_at'—
soft_delete_flag_fieldstr|NoneNone—
immutable_fieldsset[str] |NoneNone—

Methods

On This Page

Constructorcountasynccount_filteredasynccreateasyncdeleteasyncexistsasyncgetasynclistasyncsearchasyncupdateasync