Skip to content

Is async file reading supported? #11

Open
@NicolasHug

Description

@NicolasHug

The docs of PathManager.opena() suggest that async reading is supported:

Usage (read):
async def my_function():
return await path_manager.opena(uri, "r").read()

But running the suggested code leads to the following error:

# Restrict mode until `NonBlockingIO` has async read feature.
valid_modes = {"w", "a", "b"}
if not all(m in valid_modes for m in mode):
raise ValueError(f"`opena` mode must be write or append for path {path}")

Are there plans to support async file reading? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions