Open a file for reading. Use as .. code-block:: python async with await app.open_instance_resource(path) as file_: await file_.read()
(
self, path: FilePath, mode: str = "rb"
)
| 406 | return async_open(os.path.join(self.root_path, path), mode) # type: ignore |
| 407 | |
| 408 | async def open_instance_resource( |
| 409 | self, path: FilePath, mode: str = "rb" |
| 410 | ) -> AiofilesContextManager: |
| 411 | """Open a file for reading. |
| 412 | |
| 413 | Use as |
| 414 | |
| 415 | .. code-block:: python |
| 416 | |
| 417 | async with await app.open_instance_resource(path) as file_: |
| 418 | await file_.read() |
| 419 | """ |
| 420 | return async_open(self.instance_path / file_path_to_path(path), mode) # type: ignore |
| 421 | |
| 422 | def create_jinja_environment(self) -> Environment: # type: ignore |
| 423 | """Create and return the jinja environment. |
nothing calls this directly
no test coverage detected