Guess a files type from its content and extension
Project description
File Type Guesser
Guess a file's type from its content and extension.
This is intended to be a pure Python implementation of something like python-magic. This means it should work on all platforms that can run Python as it does not require external binaries like libmagic.
This project currently is not heavily tested and not fully feature complete
Example Of Use
from pathlib import Path
from file_type_guesser import guess_file
path = Path("README.md")
guess = guess_file(path)
print(guess)
ContentGuess(category=<FileTypes.TEXT: 1>, extention='md', content_ext='md')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for file_type_guesser-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7659be8196aea8da002e0001e570e43a4a7275a1fbe32e35217f0164cee99882 |
|
MD5 | 59d2be403efeb4a02f81c27a3e1e681b |
|
BLAKE2b-256 | 4e26472ade76b6ec1a0971a7674d17862176b60484d7aad9e3fa91f5f1b27bda |