Last active
February 21, 2024 21:18
-
-
Save dmwyatt/d3307d830b71e1677472843a43d4dccb to your computer and use it in GitHub Desktop.
A Union of all file types in `filetype` package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frofrom typing import Union | |
from filetype.types import application, archive, audio, document, font, image, video | |
ImageFileType = Union[ | |
image.Dwg, | |
image.Xcf, | |
image.Jpeg, | |
image.Jpx, | |
image.Apng, | |
image.Png, | |
image.Gif, | |
image.Webp, | |
image.Tiff, | |
image.Cr2, | |
image.Bmp, | |
image.Jxr, | |
image.Psd, | |
image.Ico, | |
image.Heic, | |
image.Dcm, | |
image.Avif, | |
] | |
VideoFileType = Union[ | |
video.M3gp, | |
video.Mp4, | |
video.M4v, | |
video.Mkv, | |
video.Mov, | |
video.Avi, | |
video.Wmv, | |
video.Mpeg, | |
video.Webm, | |
video.Flv, | |
] | |
AudioFileType = Union[ | |
audio.Aac, | |
audio.Midi, | |
audio.Mp3, | |
audio.M4a, | |
audio.Ogg, | |
audio.Flac, | |
audio.Wav, | |
audio.Amr, | |
audio.Aiff, | |
] | |
FontFileType = Union[ | |
font.Woff, | |
font.Woff2, | |
font.Ttf, | |
font.Otf, | |
] | |
DocumentFileType = Union[ | |
document.Doc, | |
document.Docx, | |
document.Odt, | |
document.Xls, | |
document.Xlsx, | |
document.Ods, | |
document.Ppt, | |
document.Pptx, | |
document.Odp, | |
] | |
ArchiveFileType = Union[ | |
archive.Br, | |
archive.Rpm, | |
archive.Epub, | |
archive.Zip, | |
archive.Tar, | |
archive.Rar, | |
archive.Gz, | |
archive.Bz2, | |
archive.SevenZ, | |
archive.Pdf, | |
archive.Exe, | |
archive.Swf, | |
archive.Rtf, | |
archive.Nes, | |
archive.Crx, | |
archive.Cab, | |
archive.Eot, | |
archive.Ps, | |
archive.Xz, | |
archive.Sqlite, | |
archive.Deb, | |
archive.Ar, | |
archive.Z, | |
archive.Lzop, | |
archive.Lz, | |
archive.Elf, | |
archive.Lz4, | |
archive.Zstd, | |
] | |
ApplicationFileType = Union[application.Wasm,] | |
FileType = Union[ | |
ImageFileType, | |
VideoFileType, | |
AudioFileType, | |
FontFileType, | |
ArchiveFileType, | |
ApplicationFileType, | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment