Objects API#
- fastapi_restly.objects.apply_schema(session: Session, obj: _T, schema_obj: BaseModel, schema_cls: type[BaseModel] | None = None) _T#
Apply writable fields from
schema_objtoobj.This is the schema-to-ORM update primitive. It resolves Restly reference fields and applies only writable inputs. It does not flush and does not run view-level
perform_updatebusiness logic.
- async fastapi_restly.objects.async_apply_schema(session: AsyncSession, obj: _T, schema_obj: BaseModel, schema_cls: type[BaseModel] | None = None) _T#
Async equivalent of
apply_schema().
- async fastapi_restly.objects.async_build_from_schema(session: AsyncSession, model_cls: type[_T], schema_obj: BaseModel, schema_cls: type[BaseModel] | None = None) _T#
Async equivalent of
build_from_schema().
- async fastapi_restly.objects.async_delete_object(session: AsyncSession, obj: DeclarativeBase) None#
Async equivalent of
delete_object().
- async fastapi_restly.objects.async_save_object(session: AsyncSession, obj: _T) _T#
Async equivalent of
save_object().
- fastapi_restly.objects.build_from_schema(session: Session, model_cls: type[_T], schema_obj: BaseModel, schema_cls: type[BaseModel] | None = None) _T#
Build
model_clsfromschema_objand add it tosession.This is the schema-to-ORM mapping primitive. It resolves Restly reference fields, skips read-only inputs, applies schema defaults, and stages the object in the session. It does not flush and does not run view-level
perform_createbusiness logic.
- fastapi_restly.objects.delete_object(session: Session, obj: DeclarativeBase) None#
Delete
objand flush the session.
- fastapi_restly.objects.save_object(session: Session, obj: _T) _T#
Flush the session and refresh
objfrom the database.