Metadata-Version: 2.1
Name: file-type-guesser
Version: 0.2.0
Summary: Guess a files type from its content and extension
Home-page: https://github.com/enchant97/python-file-type-guesser
Author: Leo Spratt
Author-email: "contact@enchantedcode.co.uk"
License: MIT
Project-URL: Change Log, https://github.com/enchant97/python-file-type-guesser/blob/main/CHANGELOG.md
Project-URL: Documentation, https://python-file-type-guesser.readthedocs.io/en/stable/
Keywords: git scm
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Intended Audience :: Developers
Classifier: Topic :: Text Processing
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE

# File Type Guesser
[![Test](https://github.com/enchant97/python-file-type-guesser/actions/workflows/python-test.yml/badge.svg)](https://github.com/enchant97/python-file-type-guesser/actions/workflows/python-test.yml)
![PyPI](https://img.shields.io/pypi/v/file-type-guesser)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/file-type-guesser)
![PyPI - Downloads](https://img.shields.io/pypi/dm/file-type-guesser)
![License MIT](https://img.shields.io/github/license/enchant97/python-file-type-guesser)
![Open Issues](https://img.shields.io/github/issues/enchant97/python-file-type-guesser)
![Line Count](https://img.shields.io/tokei/lines/github/enchant97/python-file-type-guesser)
![Last Commit](https://img.shields.io/github/last-commit/enchant97/python-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](https://pypi.org/project/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

```python
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')
```


