astro.files.types
Submodules
Package Contents
Functions
|
Factory method to create FileType super objects based on the file extension in path or filetype specified. |
|
Return a FileType given the filepath. Uses a naive strategy, using the file extension. |
- astro.files.types.create_file_type(path, filetype=None, normalize_config=None, load_options_list=None)
Factory method to create FileType super objects based on the file extension in path or filetype specified.
- Parameters:
path (str) –
filetype (astro.constants.FileType | None) –
normalize_config (dict | None) –
load_options_list (astro.options.LoadOptionsList | None) –
- Return type:
- astro.files.types.get_filetype(filepath)
Return a FileType given the filepath. Uses a naive strategy, using the file extension.
- Parameters:
filepath (str or pathlib.PosixPath) – URI or Path to a file
- Returns:
The filetype (e.g. csv, ndjson, json, parquet, excel)
- Return type: