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)

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

Parameters
  • path (str) –

  • filetype (FileTypeConstants | None) –

  • normalize_config (dict | None) –

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)

Return type

astro.constants.FileType