(self, doc_id: str)
| 47 | |
| 48 | # ---- document CRUD ---- |
| 49 | async def get(self, doc_id: str) -> Optional[Dict[str, Any]]: |
| 50 | r = await self._c.get(f"/{self.db}/{doc_id}") |
| 51 | if r.status_code == 404: |
| 52 | return None |
| 53 | r.raise_for_status() |
| 54 | return r.json() |
| 55 | |
| 56 | async def put(self, doc: Dict[str, Any]) -> Dict[str, Any]: |
| 57 | if "_id" not in doc: |
no outgoing calls