# 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
Raw data
{
"_id": null,
"home_page": "https://github.com/riad-azz/py-file-type",
"name": "py-file-type",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python-magic wrapper,python-magic-bin,python-magic binaries,libmagic",
"author": "riad-azz",
"author_email": "riadh.azzoun@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/48/1f/c4cdef9f81c3549dafea94b71efc0acaa6fa8c51fcd2d99b89761ab585b8/py_file_type-0.1.0.tar.gz",
"platform": null,
"description": "# Py File Type\r\n\r\nA wrapper for [python-magic](https://pypi.org/project/python-magic/) that includes python-magic-bin files.\r\n\r\n## Description\r\n\r\nThis was made duo to a file conflict problem happening when trying to\r\ninstall [python-magic](https://github.com/ahupp/python-magic)\r\nand [python-magic-bin](https://pypi.org/project/python-magic-bin/).\r\n\r\n## Installing\r\n\r\n```bash\r\npip install py-file-type\r\n```\r\n\r\n## Usage\r\n\r\nWorks exactly like [python-magic](https://github.com/ahupp/python-magic)\r\n\r\n```python\r\nimport py_file_type as magic\r\n\r\nfile_type = magic.from_file('video.mp4', mime=True)\r\nprint(file_type) # -> video/mp4\r\n```\r\n\r\n## Authors\r\n\r\nRiadh Azzoun - [@riad-azz](https://github.com/riad-azz)\r\n\r\n## License\r\n\r\nThis project is licensed under the [MIT] License - see the LICENSE.md file for details\r\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Wrapper for python-magic that includes necessary bin files.",
"version": "0.1.0",
"split_keywords": [
"python-magic wrapper",
"python-magic-bin",
"python-magic binaries",
"libmagic"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "14e90c987ad71699468da96959b9d3bd5ecabca0d37fba0d222cd0c421a99e9d",
"md5": "9e82a6d4c2a5d790fe12b25f61150a95",
"sha256": "f91fbdad61f13ba41d374b7c3ded2b1cea2971e3ecdc0e5086b12648a02a1b5a"
},
"downloads": -1,
"filename": "py_file_type-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9e82a6d4c2a5d790fe12b25f61150a95",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 815293,
"upload_time": "2023-04-22T20:12:47",
"upload_time_iso_8601": "2023-04-22T20:12:47.987459Z",
"url": "https://files.pythonhosted.org/packages/14/e9/0c987ad71699468da96959b9d3bd5ecabca0d37fba0d222cd0c421a99e9d/py_file_type-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "481fc4cdef9f81c3549dafea94b71efc0acaa6fa8c51fcd2d99b89761ab585b8",
"md5": "9dabb18d32a450c1525cf3c67bd47189",
"sha256": "26c3129103ca6b4d4c0ba4dfa86a9cc09bf287c0ec725ef8c296bc76aa054cfd"
},
"downloads": -1,
"filename": "py_file_type-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "9dabb18d32a450c1525cf3c67bd47189",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 391697,
"upload_time": "2023-04-22T20:12:53",
"upload_time_iso_8601": "2023-04-22T20:12:53.488464Z",
"url": "https://files.pythonhosted.org/packages/48/1f/c4cdef9f81c3549dafea94b71efc0acaa6fa8c51fcd2d99b89761ab585b8/py_file_type-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-22 20:12:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "riad-azz",
"github_project": "py-file-type",
"lcname": "py-file-type"
}