Name | file-magic JSON |
Version |
0.4.1
JSON |
| download |
home_page | https://github.com/file/file |
Summary | Python front end for libmagic(3) |
upload_time | 2022-09-01 12:13:33 |
maintainer | |
docs_url | None |
author | Reuben Thomas, Álvaro Justen |
requires_python | >=2.7 |
license | Copyright (c) Ian F. Darwin 1986-1995. Software written by Ian F. Darwin and others; maintained 1995-present by Christos Zoulas and others. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice immediately at the beginning of the file, without modification, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
keywords |
file
magic
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
|
coveralls test coverage |
No coveralls.
|
# `file-magic`: Python Bindings
This library is a Python ctypes interface to `libmagic`.
## Installing
You can install `file-magic` either with:
python setup.py install
# or
easy_install .
# or
pip install file-magic
## Using
import magic
detected = magic.detect_from_filename('magic.py')
print 'Detected MIME type: {}'.format(detected.mime_type)
print 'Detected encoding: {}'.format(detected.encoding)
print 'Detected file type name: {}'.format(detected.name)
## Developing/Contributing
To run the tests:
python setup.py test
Raw data
{
"_id": null,
"home_page": "https://github.com/file/file",
"name": "file-magic",
"maintainer": "",
"docs_url": null,
"requires_python": ">=2.7",
"maintainer_email": "",
"keywords": "file,magic",
"author": "Reuben Thomas, \u00c1lvaro Justen",
"author_email": "Christos Zoulas <christos@astron.com>",
"download_url": "https://files.pythonhosted.org/packages/a3/d0/c6de1473a87dc74bbc694490c627d47c57b49d2f62be3c6c2871512d3c07/file-magic-0.4.1.tar.gz",
"platform": null,
"description": "# `file-magic`: Python Bindings\n\nThis library is a Python ctypes interface to `libmagic`.\n\n\n## Installing\n\nYou can install `file-magic` either with:\n\n python setup.py install\n # or\n easy_install .\n # or\n pip install file-magic\n\n\n## Using\n\n import magic\n\n detected = magic.detect_from_filename('magic.py')\n print 'Detected MIME type: {}'.format(detected.mime_type)\n print 'Detected encoding: {}'.format(detected.encoding)\n print 'Detected file type name: {}'.format(detected.name)\n\n\n## Developing/Contributing\n\nTo run the tests:\n\n python setup.py test\n",
"bugtrack_url": null,
"license": "Copyright (c) Ian F. Darwin 1986-1995. Software written by Ian F. Darwin and others; maintained 1995-present by Christos Zoulas and others. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice immediately at the beginning of the file, without modification, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
"summary": "Python front end for libmagic(3)",
"version": "0.4.1",
"split_keywords": [
"file",
"magic"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "2ff6ba9efb94459517203b3eaaebde45",
"sha256": "cb9496a1656baf75cadd771479f63b53081095e968d0be72b9b7a7ed538e4fb8"
},
"downloads": -1,
"filename": "file_magic-0.4.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2ff6ba9efb94459517203b3eaaebde45",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=2.7",
"size": 6298,
"upload_time": "2022-09-01T12:13:31",
"upload_time_iso_8601": "2022-09-01T12:13:31.633692Z",
"url": "https://files.pythonhosted.org/packages/bd/13/de7c05b7b64f4e41cca7385642884490e2fa704dc1e695d1429119caa9c2/file_magic-0.4.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "534e6204eaaa58d944c1b5a48b784e2d",
"sha256": "a91d1483117f7ed48cd0238ad9be36b04824d57e9c38ea7523113989e81b9c53"
},
"downloads": -1,
"filename": "file-magic-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "534e6204eaaa58d944c1b5a48b784e2d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=2.7",
"size": 5656,
"upload_time": "2022-09-01T12:13:33",
"upload_time_iso_8601": "2022-09-01T12:13:33.786981Z",
"url": "https://files.pythonhosted.org/packages/a3/d0/c6de1473a87dc74bbc694490c627d47c57b49d2f62be3c6c2871512d3c07/file-magic-0.4.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-09-01 12:13:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "file",
"github_project": "file",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "file-magic"
}