Skip to content

cloudpathlib.AnyPath

Polymorphic virtual superclass for CloudPath and pathlib.Path. Constructing an instance will automatically dispatch to CloudPath or Path based on the input. It also supports both isinstance and issubclass checks.

This class also integrates with Pydantic. When used as a type declaration for a Pydantic BaseModel, the Pydantic validation process will appropriately run inputs through this class' constructor and dispatch to CloudPath or Path.