tlc.core.url_adapters.api_url_adapter
¶
A mostly dummy adapter for resolving URLs starting with api://
.
Module Contents¶
Classes¶
Class |
Description |
---|---|
A mostly dummy adapter for resolving URLs starting with |
API¶
- class tlc.core.url_adapters.api_url_adapter.ApiUrlAdapter¶
Bases:
tlc.core.url_adapter.UrlAdapter
A mostly dummy adapter for resolving URLs starting with
api://
.In fact, there is never a need to resolve “api://” URLs because the objects will already be in the ObjectRegistry, but this is a convenient place for putting other related functionality.
- api_scheme = None¶
- api_protocol = None¶
- schemes() list[tlc.core.url.Scheme] ¶
- abstract read_string_content_from_url(url: tlc.core.url.Url) str ¶
- abstract read_string_content_from_url_async(url: tlc.core.url.Url) concurrent.futures.Future ¶
- abstract write_string_content_to_url_async(url: tlc.core.url.Url, content: str, options: tlc.core.url_adapter.IfExistsOption = IfExistsOption.OVERWRITE) concurrent.futures.Future ¶
- abstract read_binary_content_from_url(url: tlc.core.url.Url) bytes ¶
- abstract read_binary_content_from_url_async(url: tlc.core.url.Url) concurrent.futures.Future ¶
- abstract write_binary_content_to_url_async(url: tlc.core.url.Url, content: bytes, options: tlc.core.url_adapter.IfExistsOption = IfExistsOption.OVERWRITE) concurrent.futures.Future ¶
- abstract delete_url(url: tlc.core.url.Url) None ¶
- abstract delete_url_async(url: tlc.core.url.Url) concurrent.futures.Future ¶
- abstract copy_url_async(source: tlc.core.url.Url, destination: tlc.core.url.Url, options: tlc.core.url_adapter.IfExistsOption = IfExistsOption.OVERWRITE) concurrent.futures.Future ¶
- abstract make_dirs(url: tlc.core.url.Url, exist_ok: bool = False) None ¶
- abstract make_dirs_async(url: tlc.core.url.Url, exist_ok: bool = False) concurrent.futures.Future ¶
- abstract get_file_size(url: tlc.core.url.Url) int ¶
- abstract get_file_size_async(url: tlc.core.url.Url) concurrent.futures.Future ¶
- abstract list_dir(url: tlc.core.url.Url) collections.abc.Iterator[tlc.core.url_adapter.UrlAdapterDirEntry] ¶
- abstract list_dir_async(url: tlc.core.url.Url) concurrent.futures.Future ¶
- exists(url: tlc.core.url.Url) bool ¶
- abstract exists_async(url: tlc.core.url.Url) concurrent.futures.Future ¶
- is_dir(url: tlc.core.url.Url) bool ¶
- abstract is_dir_async(url: tlc.core.url.Url) concurrent.futures.Future ¶
- is_writable(url: tlc.core.url.Url) bool ¶
- abstract is_writable_async(url: tlc.core.url.Url) concurrent.futures.Future ¶
- abstract stat(url: tlc.core.url.Url) tlc.core.url_adapter.UrlAdapterDirEntry ¶
API URLs don’t support file status operations.
- Parameters:
url – The URL to get status for
- Raises:
NotImplementedError – Always, as API URLs don’t support stat
- abstract stat_async(url: tlc.core.url.Url) concurrent.futures.Future ¶
- touch(url: tlc.core.url.Url) None ¶
API URLs don’t support file modification operations.
- Parameters:
url – The URL to touch
- Raises:
NotImplementedError – Always, as API URLs don’t support touch