
[![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)
[![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)
[![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/)
[![pylint](https://mperlet.github.io/pybadge/badges/10.svg)](https://github.com/file-validator/file-validator/actions)
[![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)
[![Badge](https://i2pget6bpxrn.runkit.sh)](https://file-validator.github.io/)
[![codefactor](https://www.codefactor.io/repository/github/rzashakeri/file-validator/badge)](https://www.codefactor.io/repository/github/rzashakeri/file-validator)
[![codebeat badge](https://codebeat.co/badges/e4a99576-8d18-4f11-86b9-42860a8fe8e0)](https://codebeat.co/projects/github-com-file-validator-file-validator-master)
[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

## 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


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


* 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)


## Credits

This library was created By [Reza Shakeri](https://github.com/rzashakeri)
