IDField is special field which is used to specify custom id for documents. If no id specify then id will be generated automatically.
class User(Mode): user_id = IDField() u = User() u.user_id = "custom_doc_id" u.save() # After save id will be saved in `user_id` print(self.user_id) # custom_doc_id
The following attributes supported by ID Field.
Default value for field. This is base attribute that is available in all fields. Read More
Trueif value is required for the field. This is base attribute that is available in all fields. Read More