beanie.odm.fields
Indexed
def Indexed(typ, index_type=ASCENDING, **kwargs)
Returns a subclass of
typ
with an extra attribute_indexed
as a tuple: - Index 0:index_type
such aspymongo.ASCENDING
- Index 1:kwargs
passed toIndexModel
When instantiated the type of the result will actually betyp
.
PydanticObjectId
class PydanticObjectId(ObjectId)
Object Id field. Compatible with Pydantic.
ExpressionField
class ExpressionField(str)
ExpressionField.__getitem__
def __getitem__(item)
Get sub field
Arguments:
item
: name of the subfieldReturns:
ExpressionField
ExpressionField.__getattr__
def __getattr__(item)
Get sub field
Arguments:
item
: name of the subfieldReturns:
ExpressionField