https://github.com/riad-azz/py-file-type
Wrapper for python-magic that includes necessary bin files.
https://github.com/riad-azz/py-file-type
libmagic library-wrapper pypi pypi-package python python-magic python-magic-bin
Last synced: 16 days ago
JSON representation
Wrapper for python-magic that includes necessary bin files.
- Host: GitHub
- URL: https://github.com/riad-azz/py-file-type
- Owner: riad-azz
- License: mit
- Created: 2023-04-22T19:43:26.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-04-22T20:13:56.000Z (about 3 years ago)
- Last Synced: 2026-06-22T16:05:37.379Z (27 days ago)
- Topics: libmagic, library-wrapper, pypi, pypi-package, python, python-magic, python-magic-bin
- Language: Python
- Homepage: https://pypi.org/project/py-file-type/
- Size: 394 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Py File Type
A wrapper for [python-magic](https://pypi.org/project/python-magic/) that includes python-magic-bin files.
## Description
This was made duo to a file conflict problem happening when trying to
install [python-magic](https://github.com/ahupp/python-magic)
and [python-magic-bin](https://pypi.org/project/python-magic-bin/).
## Installing
```bash
pip install py-file-type
```
## Usage
Works exactly like [python-magic](https://github.com/ahupp/python-magic)
```python
import py_file_type as magic
file_type = magic.from_file('video.mp4', mime=True)
print(file_type) # -> video/mp4
```
## Authors
Riadh Azzoun - [@riad-azz](https://github.com/riad-azz)
## License
This project is licensed under the [MIT] License - see the LICENSE.md file for details