astro.files.types

Submodules

Package Contents

Functions

create_file_type(path[, filetype, normalize_config, ...])

Factory method to create FileType super objects based on the file extension in path or filetype specified.

get_filetype(filepath)

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:
Return type:

base.FileType

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:

astro.constants.FileType