User Guide
Everything you need to install, configure, and build with Montycat — from getting started to governance, advanced operations, and security.
Delete
Delete a single record
When you delete a record, Montycat automatically takes care of all the background housekeeping such as resolving pointers, updating or removing indexes, and cleaning up references.
You only need to provide either a regular key or a custom key.
from keyspaces import Employees #keyspaces.py
res1 = await Employees.delete_key(key="128222336824100726154851618391811195396")
res2 = await Employees.delete_key(custom_key="myCustomKey")
# {"status": True, "payload": None, "error": None}Bulk deletion
Montycat also supports deleting multiple records in a single call.
You can pass a mix of regular keys and custom keys together.
Behind the scenes, Montycat will handle pointer resolution, index updates, and cleanup for each record.
- If all deletions succeed → returns status: true
- If some deletions fail → returns status: false with a list of failed_keys
- If all deletions fail → returns status: false with an error message
from keyspaces import Employees #keyspaces.py
regular_keys_to_delete = ["128222336824100726154851618391811195396", "128222344424100726555851618391811195555"]
custom_keys_to_delete = ["myFirstCustomKey", "mySecondCustomKey"]
res1 = await Employees.delete_bulk(keys=regular_keys_to_delete, custom_keys=custom_keys_to_delete)
# {"status": True, "payload": None, "error": None}
# or if all of deletions failed:
# {"status": False, "payload": None, "error": "Error Text"}
# or if some of deletions failed:
# {"status": False, "payload": {"failed": ["128222344424100726555851618391811195555"]}, "error": "Error Text"}