file-validator


Namefile-validator JSON
Version 1.0.9 PyPI version JSON
download
home_pagehttps://github.com/file-validator/file-validator
SummaryPython validation library to validate files using type, mime, extension, magic numbers and size ✅
upload_time2023-05-19 22:52:00
maintainer
docs_urlNone
authorReza Shakeri
requires_python>=3.8
licenseMIT license
keywords file_validator file validator image_validator audio_validator video_validator django
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            <pre style="position: relative;color: black;">0000-0010:  89 50 4e 47-0d 0a 1a 0a-00 00 00 0d-49 48 44 52  .PNG.... ....IHDR
0000-0020:  00 00 04 7b-00 00 04 dc-08 06 00 00-00 14 48 89  ...{.... ......H.
0000-0030:  b8 00 00 20-00 49 44 41-54 78 9c ec-dd dd 6f 9b  .....IDA Tx....o.
0000-0040:  e7 79 c7 f1-4b 22 25 ca-2c d9 06 89-e2 84 69 d2  .y..K"%. ,.....i.
0000-0050:  ed a0 62 57-0c cb 10 ef-d8 f0 b1 e1-3f 70 c0 fe  ..bW.... ....?p..
0000-0060:  0f c3 c7 86-cf 5b ac c3-b0 56 ca 41-d3 bc 28 49  .....[.. .V.A..(I
0000-0070:  e5 34 0b 19-5a 6f b4 86-9b b3 8b b5-4b 03 c7 a6  .4..Zo.. ....K...
0000-0080:  24 ea a7 cf-07 20 22 39-00 f9 f0 b9-1f 09 d0 17  $....."9 ........
0000-0090:  d7 73 73 6d-32 99 9c 15-00 00 00 00-11 d6 2d 23  .ssm2... ......-#
0000-00a0:  00 00 00 40-0e b1 07 00-00 00 20 88-d8 03 00 00  ...@.... ........
0000-00b0:  00 10 44 ec-01 00 00 00-08 22 f6 00-00 00 00 04  ..D..... ."......
0000-00c0:  11 7b 00 00-00 00 82 88-3d 00 00 00-00 41 c4 1e  .{...... =....A..
0000-00d0:  00 00 00 80-20 62 0f 00-00 00 40 10-b1 07 00 00  .....b.. ..@.....
0000-00e0:  00 20 88 d8-03 00 00 00-10 44 ec 01-00 00 00 08  ........ .D......
0000-00f0:  22 f6 00 00-00 00 04 11-7b 00 00 00-00 82 88 3d  "....... {......=
0000-0100:  00 00 00 00-41 c4 1e 00-00 00 80 20-62 0f 00 00  ....A... ....b...
0000-0110:  00 40 10 b1-07 00 00 00-20 88 d8 03-00 00 00 10  .@...... ........<div class="open_grepper_editor" title="Edit &amp; Save To Grepper"></div></pre>


[![pypi](https://img.shields.io/pypi/v/file_validator.svg?color=light)](https://pypi.org/project/file-validator/)
[![made with python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg?color=light)](https://python.org)
[![license](https://img.shields.io/github/license/rzashakeri/file_validator?color=light)](https://github.com/file-validator/file-validator/blob/master/LICENSE)
[![Build status](https://ci.appveyor.com/api/projects/status/dplr2t9bkulmh4v5?svg=true)](https://ci.appveyor.com/project/rzashakeri/file-validator-inxf9)
[![Coverage Status](https://coveralls.io/repos/github/file-validator/file-validator/badge.svg)](https://coveralls.io/github/file-validator/file-validator)
[![python-versions](https://img.shields.io/pypi/pyversions/file-validator?color=light)](https://pypi.org/project/file-validator/)
[![Downloads](https://static.pepy.tech/personalized-badge/file-validator?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/file-validator)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/file-validator/file-validator/master.svg)](https://results.pre-commit.ci/latest/github/file-validator/file-validator/master)
[![DeepSource](https://deepsource.io/gh/file-validator/file-validator.svg/?label=active+issues&show_trend=true&token=0lNzvy0mQJqkT_aLu8BKzEXs)](https://deepsource.io/gh/file-validator/file-validator/?ref=repository-badge)
[![CodeFactor](https://www.codefactor.io/repository/github/file-validator/file-validator/badge)](https://www.codefactor.io/repository/github/file-validator/file-validator)
[![black](https://github.com/file-validator/file-validator/actions/workflows/black.yml/badge.svg?branch=master)](https://github.com/file-validator/file-validator/actions/workflows/black.yml)
[![docs](https://github.com/file-validator/file-validator/actions/workflows/deploy.yml/badge.svg)](https://github.com/file-validator/file-validator/actions/workflows/deploy.yml)
[![Pylint](https://github.com/file-validator/file-validator/actions/workflows/pylint.yml/badge.svg)](https://github.com/file-validator/file-validator/actions/workflows/pylint.yml)
[![Workflow for Codecov](https://github.com/file-validator/file-validator/actions/workflows/Codecov.yml/badge.svg)](https://github.com/file-validator/file-validator/actions/workflows/Codecov.yml)
[![Python package](https://github.com/file-validator/file-validator/actions/workflows/python-package.yml/badge.svg)](https://github.com/file-validator/file-validator/actions/workflows/python-package.yml)
[![CodeQL](https://github.com/file-validator/file-validator/actions/workflows/codeql.yml/badge.svg)](https://github.com/file-validator/file-validator/actions/workflows/codeql.yml)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/file-validator/file-validator.svg)](http://isitmaintained.com/project/file-validator/file-validator "Percentage of issues still open")

## What Is File Validator? ✅

It is a Python library for file validation based on **MIME**, **size**, **type** and **magic numbers** that supports Django.

## Why should we use this library? 🧐


* File validation based on **MIME**, **type**, **extension**, **magic numbers** and **size**


* File validation using the [filetype](https://github.com/h2non/filetype.py) library


* File validation using the [python-magic](https://github.com/ahupp/python-magic) library


* File validation using the [mimetypes](https://docs.python.org/3/library/mimetypes.html) library


* File validation using the [puremagic](https://github.com/cdgriffith/puremagic) library


* File validation simultaneously with all libraries


* File Size validation


* Provided **ValidatedFilefield** and **FileValidator** for file validation in [Django](https://www.djangoproject.com/)


* Provided **ValidatedFilefield** in forms with support  [accept](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept), [multiple](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/multiple) and `custom css` attributes


* Supporting for all mimes

## Where to report if we found a bug? 🪲

Can report the problem through [this link](https://github.com/file-validator/file-validator/issues)

## Where should I ask if I had any questions❓

Can you ask your questions through [this link](https://github.com/orgs/file-validator/discussions)

## Where to read the documentation? 📄

Can you read the documentation through [this link](https://file-validator.github.io)


## Contributors

<a href="https://github.com/file-validator/file-validator/graphs/contributors">
  <img width='250' src="https://contrib.rocks/image?repo=file-validator/file-validator" />
</a>



## Where to read the last history of changes? 📃


you can read the latest changes history in this [link](https://file-validator.github.io/docs/history/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/file-validator/file-validator",
    "name": "file-validator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "file_validator,file,validator,image_validator,audio_validator,video_validator,django",
    "author": "Reza Shakeri",
    "author_email": "rzashakeri@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/2b/f0/2e6e840794d807c64f634e524fe637b2bb0aa6bb057565ad618d490e9c21/file_validator-1.0.9.tar.gz",
    "platform": null,
    "description": "<pre style=\"position: relative;color: black;\">0000-0010:  89 50 4e 47-0d 0a 1a 0a-00 00 00 0d-49 48 44 52  .PNG.... ....IHDR\r\n0000-0020:  00 00 04 7b-00 00 04 dc-08 06 00 00-00 14 48 89  ...{.... ......H.\r\n0000-0030:  b8 00 00 20-00 49 44 41-54 78 9c ec-dd dd 6f 9b  .....IDA Tx....o.\r\n0000-0040:  e7 79 c7 f1-4b 22 25 ca-2c d9 06 89-e2 84 69 d2  .y..K\"%. ,.....i.\r\n0000-0050:  ed a0 62 57-0c cb 10 ef-d8 f0 b1 e1-3f 70 c0 fe  ..bW.... ....?p..\r\n0000-0060:  0f c3 c7 86-cf 5b ac c3-b0 56 ca 41-d3 bc 28 49  .....[.. .V.A..(I\r\n0000-0070:  e5 34 0b 19-5a 6f b4 86-9b b3 8b b5-4b 03 c7 a6  .4..Zo.. ....K...\r\n0000-0080:  24 ea a7 cf-07 20 22 39-00 f9 f0 b9-1f 09 d0 17  $.....\"9 ........\r\n0000-0090:  d7 73 73 6d-32 99 9c 15-00 00 00 00-11 d6 2d 23  .ssm2... ......-#\r\n0000-00a0:  00 00 00 40-0e b1 07 00-00 00 20 88-d8 03 00 00  ...@.... ........\r\n0000-00b0:  00 10 44 ec-01 00 00 00-08 22 f6 00-00 00 00 04  ..D..... .\"......\r\n0000-00c0:  11 7b 00 00-00 00 82 88-3d 00 00 00-00 41 c4 1e  .{...... =....A..\r\n0000-00d0:  00 00 00 80-20 62 0f 00-00 00 40 10-b1 07 00 00  .....b.. ..@.....\r\n0000-00e0:  00 20 88 d8-03 00 00 00-10 44 ec 01-00 00 00 08  ........ .D......\r\n0000-00f0:  22 f6 00 00-00 00 04 11-7b 00 00 00-00 82 88 3d  \"....... {......=\r\n0000-0100:  00 00 00 00-41 c4 1e 00-00 00 80 20-62 0f 00 00  ....A... ....b...\r\n0000-0110:  00 40 10 b1-07 00 00 00-20 88 d8 03-00 00 00 10  .@...... ........<div class=\"open_grepper_editor\" title=\"Edit &amp; Save To Grepper\"></div></pre>\r\n\r\n\r\n[![pypi](https://img.shields.io/pypi/v/file_validator.svg?color=light)](https://pypi.org/project/file-validator/)\r\n[![made with python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg?color=light)](https://python.org)\r\n[![license](https://img.shields.io/github/license/rzashakeri/file_validator?color=light)](https://github.com/file-validator/file-validator/blob/master/LICENSE)\r\n[![Build status](https://ci.appveyor.com/api/projects/status/dplr2t9bkulmh4v5?svg=true)](https://ci.appveyor.com/project/rzashakeri/file-validator-inxf9)\r\n[![Coverage Status](https://coveralls.io/repos/github/file-validator/file-validator/badge.svg)](https://coveralls.io/github/file-validator/file-validator)\r\n[![python-versions](https://img.shields.io/pypi/pyversions/file-validator?color=light)](https://pypi.org/project/file-validator/)\r\n[![Downloads](https://static.pepy.tech/personalized-badge/file-validator?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/file-validator)\r\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/file-validator/file-validator/master.svg)](https://results.pre-commit.ci/latest/github/file-validator/file-validator/master)\r\n[![DeepSource](https://deepsource.io/gh/file-validator/file-validator.svg/?label=active+issues&show_trend=true&token=0lNzvy0mQJqkT_aLu8BKzEXs)](https://deepsource.io/gh/file-validator/file-validator/?ref=repository-badge)\r\n[![CodeFactor](https://www.codefactor.io/repository/github/file-validator/file-validator/badge)](https://www.codefactor.io/repository/github/file-validator/file-validator)\r\n[![black](https://github.com/file-validator/file-validator/actions/workflows/black.yml/badge.svg?branch=master)](https://github.com/file-validator/file-validator/actions/workflows/black.yml)\r\n[![docs](https://github.com/file-validator/file-validator/actions/workflows/deploy.yml/badge.svg)](https://github.com/file-validator/file-validator/actions/workflows/deploy.yml)\r\n[![Pylint](https://github.com/file-validator/file-validator/actions/workflows/pylint.yml/badge.svg)](https://github.com/file-validator/file-validator/actions/workflows/pylint.yml)\r\n[![Workflow for Codecov](https://github.com/file-validator/file-validator/actions/workflows/Codecov.yml/badge.svg)](https://github.com/file-validator/file-validator/actions/workflows/Codecov.yml)\r\n[![Python package](https://github.com/file-validator/file-validator/actions/workflows/python-package.yml/badge.svg)](https://github.com/file-validator/file-validator/actions/workflows/python-package.yml)\r\n[![CodeQL](https://github.com/file-validator/file-validator/actions/workflows/codeql.yml/badge.svg)](https://github.com/file-validator/file-validator/actions/workflows/codeql.yml)\r\n[![Percentage of issues still open](http://isitmaintained.com/badge/open/file-validator/file-validator.svg)](http://isitmaintained.com/project/file-validator/file-validator \"Percentage of issues still open\")\r\n\r\n## What Is File Validator? \u2705\r\n\r\nIt is a Python library for file validation based on **MIME**, **size**, **type** and **magic numbers** that supports Django.\r\n\r\n## Why should we use this library? \ud83e\uddd0\r\n\r\n\r\n* File validation based on **MIME**, **type**, **extension**, **magic numbers** and **size**\r\n\r\n\r\n* File validation using the [filetype](https://github.com/h2non/filetype.py) library\r\n\r\n\r\n* File validation using the [python-magic](https://github.com/ahupp/python-magic) library\r\n\r\n\r\n* File validation using the [mimetypes](https://docs.python.org/3/library/mimetypes.html) library\r\n\r\n\r\n* File validation using the [puremagic](https://github.com/cdgriffith/puremagic) library\r\n\r\n\r\n* File validation simultaneously with all libraries\r\n\r\n\r\n* File Size validation\r\n\r\n\r\n* Provided **ValidatedFilefield** and **FileValidator** for file validation in [Django](https://www.djangoproject.com/)\r\n\r\n\r\n* Provided **ValidatedFilefield** in forms with support  [accept](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept), [multiple](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/multiple) and `custom css` attributes\r\n\r\n\r\n* Supporting for all mimes\r\n\r\n## Where to report if we found a bug? \ud83e\udeb2\r\n\r\nCan report the problem through [this link](https://github.com/file-validator/file-validator/issues)\r\n\r\n## Where should I ask if I had any questions\u2753\r\n\r\nCan you ask your questions through [this link](https://github.com/orgs/file-validator/discussions)\r\n\r\n## Where to read the documentation? \ud83d\udcc4\r\n\r\nCan you read the documentation through [this link](https://file-validator.github.io)\r\n\r\n\r\n## Contributors\r\n\r\n<a href=\"https://github.com/file-validator/file-validator/graphs/contributors\">\r\n  <img width='250' src=\"https://contrib.rocks/image?repo=file-validator/file-validator\" />\r\n</a>\r\n\r\n\r\n\r\n## Where to read the last history of changes? \ud83d\udcc3\r\n\r\n\r\nyou can read the latest changes history in this [link](https://file-validator.github.io/docs/history/)\r\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Python validation library to validate files using type, mime, extension, magic numbers and size \u2705",
    "version": "1.0.9",
    "project_urls": {
        "Discussions": "https://github.com/orgs/file-validator/discussions",
        "Documentation": "https://file-validator.github.io/",
        "History Of Changes": "https://file-validator.github.io/docs/history/",
        "Homepage": "https://github.com/file-validator",
        "Issue tracker": "https://github.com/file-validator/file-validator/issues",
        "Release notes": "https://github.com/file-validator/file-validator/releases",
        "Source": "https://github.com/file-validator/file-validator"
    },
    "split_keywords": [
        "file_validator",
        "file",
        "validator",
        "image_validator",
        "audio_validator",
        "video_validator",
        "django"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7663da77750bc4fe6a5d22b7733765f1cdbc90cf7f061c0e95819c35aac89182",
                "md5": "19fcd70db6bb5102d54999da48e3dc1f",
                "sha256": "b3408820aa8eb389523eedd578e5af62667726b8c216cbb0bd8276b85c825792"
            },
            "downloads": -1,
            "filename": "file_validator-1.0.9-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "19fcd70db6bb5102d54999da48e3dc1f",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 15019,
            "upload_time": "2023-05-19T22:51:55",
            "upload_time_iso_8601": "2023-05-19T22:51:55.204930Z",
            "url": "https://files.pythonhosted.org/packages/76/63/da77750bc4fe6a5d22b7733765f1cdbc90cf7f061c0e95819c35aac89182/file_validator-1.0.9-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2bf02e6e840794d807c64f634e524fe637b2bb0aa6bb057565ad618d490e9c21",
                "md5": "dee3a76b3c01de946d7b1b84466a9c78",
                "sha256": "d74682e80c1e2117bd32d039a816ef3a2c1cf1e11053b216218b5b9758cae3ae"
            },
            "downloads": -1,
            "filename": "file_validator-1.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "dee3a76b3c01de946d7b1b84466a9c78",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 16667,
            "upload_time": "2023-05-19T22:52:00",
            "upload_time_iso_8601": "2023-05-19T22:52:00.336676Z",
            "url": "https://files.pythonhosted.org/packages/2b/f0/2e6e840794d807c64f634e524fe637b2bb0aa6bb057565ad618d490e9c21/file_validator-1.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-19 22:52:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "file-validator",
    "github_project": "file-validator",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "circle": true,
    "tox": true,
    "lcname": "file-validator"
}
        
Elapsed time: 0.07416s