# FileType

## class nominal.core.FileType(extension, mimetype)

Bases: [`NamedTuple`](https://docs.python.org/3/library/typing.html#typing.NamedTuple "(in Python v3.15)")

Default upload extension and MIME type.

Existing filename extensions are preserved verbatim. If the filename has none, `extension`
supplies the default: empty or a dot-prefixed suffix, such as `.csv.gz`.
An applied default is validated, and unsafe storage characters are rejected in the final filename.
Neither the filename nor the default extension converts or validates the file’s contents.

Create new instance of FileType(extension, mimetype)

### extension: str

Alias for field number 0

### mimetype: str

Alias for field number 1

### classmethod from_avro_stream(path)

Return type:
:   [*FileType*](https://dev.nominal.io/python/ref/generated/nominal.core.FileType.md#nominal.core.FileType "nominal.core.filetype.FileType")

### classmethod from_csv(path)

Resolve a CSV path, rejecting other formats with the supported extensions.

Return type:
:   [*FileType*](https://dev.nominal.io/python/ref/generated/nominal.core.FileType.md#nominal.core.FileType "nominal.core.filetype.FileType")

### classmethod from_parquet(path)

Resolve a Parquet file or archive path, rejecting other formats.

Return type:
:   [*FileType*](https://dev.nominal.io/python/ref/generated/nominal.core.FileType.md#nominal.core.FileType "nominal.core.filetype.FileType")

### classmethod from_path(path, default_mimetype='application/octet-stream')

Return type:
:   [*FileType*](https://dev.nominal.io/python/ref/generated/nominal.core.FileType.md#nominal.core.FileType "nominal.core.filetype.FileType")

### classmethod from_path_dataset(path)

Return type:
:   [*FileType*](https://dev.nominal.io/python/ref/generated/nominal.core.FileType.md#nominal.core.FileType "nominal.core.filetype.FileType")

### classmethod from_path_journal_json(path)

Return type:
:   [*FileType*](https://dev.nominal.io/python/ref/generated/nominal.core.FileType.md#nominal.core.FileType "nominal.core.filetype.FileType")

### classmethod from_tabular(path)

Return type:
:   [*FileType*](https://dev.nominal.io/python/ref/generated/nominal.core.FileType.md#nominal.core.FileType "nominal.core.filetype.FileType")

### classmethod from_video(path)

Return type:
:   [*FileType*](https://dev.nominal.io/python/ref/generated/nominal.core.FileType.md#nominal.core.FileType "nominal.core.filetype.FileType")

### is_avro_stream()

Return type:
:   [*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)")

### is_csv()

Return type:
:   [*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)")

### is_journal()

Return type:
:   [*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)")

### is_parquet()

Return type:
:   [*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)")

### is_parquet_archive()

Return type:
:   [*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)")

### is_parquet_file()

Return type:
:   [*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)")

### is_video()

Return type:
:   [*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)")
