file-type-guesser-0.2.0
توضیحات
Guess a files type from its content and extension
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | file-type-guesser-0.2.0 |
| نام | file-type-guesser |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Leo Spratt |
| ایمیل نویسنده | "contact@enchantedcode.co.uk" |
| آدرس صفحه اصلی | https://github.com/enchant97/python-file-type-guesser |
| آدرس اینترنتی | https://pypi.org/project/file-type-guesser/ |
| مجوز | MIT |
# File Type Guesser
[](https://github.com/enchant97/python-file-type-guesser/actions/workflows/python-test.yml)







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')
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl file-type-guesser-0.2.0:
pip install file-type-guesser-0.2.0.whl
نصب پکیج tar.gz file-type-guesser-0.2.0:
pip install file-type-guesser-0.2.0.tar.gz