Get a file from GridFS by ``"_id"``. Returns an instance of :class:`~gridfs.grid_file.GridOut`, which provides a file-like interface for reading. :param file_id: ``"_id"`` of the file to get :param session: a :class:`~pymongo.client_session.AsyncClientSe
(self, file_id: Any, session: Optional[AsyncClientSession] = None)
| 157 | return grid_file._id |
| 158 | |
| 159 | async def get(self, file_id: Any, session: Optional[AsyncClientSession] = None) -> AsyncGridOut: |
| 160 | """Get a file from GridFS by ``"_id"``. |
| 161 | |
| 162 | Returns an instance of :class:`~gridfs.grid_file.GridOut`, |
| 163 | which provides a file-like interface for reading. |
| 164 | |
| 165 | :param file_id: ``"_id"`` of the file to get |
| 166 | :param session: a |
| 167 | :class:`~pymongo.client_session.AsyncClientSession` |
| 168 | |
| 169 | .. versionchanged:: 3.6 |
| 170 | Added ``session`` parameter. |
| 171 | """ |
| 172 | gout = AsyncGridOut(self._collection, file_id, session=session) |
| 173 | |
| 174 | # Raise NoFile now, instead of on first attribute access. |
| 175 | await gout.open() |
| 176 | return gout |
| 177 | |
| 178 | async def get_version( |
| 179 | self, |