Metadata-Version: 2.1
Name: file-validator
Version: 0.2.0
Summary: library for validating files in Python
Home-page: https://github.com/file-validator/file-validator
Author: Reza Shakeri
Author-email: rzashakeri@outlook.com
License: MIT license
Project-URL: Documentation, https://file-validator.github.io/
Project-URL: Homepage, https://github.com/file-validator
Project-URL: Issue tracker, https://github.com/file-validator/file-validator/issues
Project-URL: Release notes, https://github.com/file-validator/file-validator/releases
Project-URL: Source, https://github.com/file-validator/file-validator
Project-URL: Discussions, https://github.com/orgs/file-validator/discussions
Keywords: file_validator,file,validator,image_validator,audio_validator,video_validator,django
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Framework :: Django
Classifier: Topic :: Multimedia
Classifier: Topic :: Multimedia :: Sound/Audio
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.md
Requires-Dist: humanize (==4.4.0)
Requires-Dist: filetype (==1.1.0)
Requires-Dist: termcolor (==1.1.0)
Requires-Dist: puremagic (==1.14)
Requires-Dist: python-dotenv (==0.21.1)
Requires-Dist: django
Requires-Dist: python-magic-bin (==0.4.14)


[![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/)
[![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://github.com/orgs/file-validator/discussions)


## Credits

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



History
=======

0.0.1 (2022-08-04)
------------------

* First release on PyPI.


0.0.2 (2022-08-06)
------------------

* Added django file validator


0.0.3 (2022-08-07)
------------------
* Added File Validator With File Type Library
* Added File Validator With Python Magic Library

0.0.4 (2022-08-07)
------------------
* Added File Validator

0.0.5 (2022-08-08)
------------------
* Added **validator for pure python** project
* Added **get_mime_type_with_python_magic** function
* Added **get_extension_with_filetype_lib** function
* Added **get_mime_type_with_filetype_lib** function
* Added **file_validator_with_filetype_lib** function

0.0.6 (2022-08-10)
------------------
* Refactoring project files

0.0.7 (2022-08-10)
------------------
* Adding Test To Project (file validator for pure python)
* Deleting **get_mime_type_with_python_magic**
* Deleting **get_extension_with_filetype_lib**
* Deleting **get_mime_type_with_filetype_lib**

0.0.8 (2022-08-11)
------------------
* Adding error message function for customization error messages
* Adding constants.py


0.0.9 (2022-08-11)
------------------
* Refactoring error message function

0.1.0 (2022-08-12)
------------------
* Fixing Minor Bug


0.1.1 (2022-08-12)
------------------
* Fixing python magic installation problem


0.1.2 (2022-08-14)
------------------
* Fixing installation problem


0.1.3 (2022-08-14)
------------------
* Adding installation guide for lib magic

0.1.4 (2022-08-15)
------------------
* Refactoring imports
* Refactoring error message
* Adding __eq__ to class
* Refactoring docstring
* Error handling when the mime type not found
* Adding the exception module
* Adding constant error message
* Refactor error_message function
* Fix get the extension problem with the mimetypes library


0.1.5 (2022-08-18)
------------------
* Adding File Size Validation
* Adding File Validation using Pure Magic Library
* Fix Minor Problem

0.1.6 (2022-08-23)
------------------
* In this version of file validator, instead
  of considering a separate class for each
  library that we want to use for file validation,
  we considered a whole class and left it to the
  administrator to choose the library that is
  going to perform the validation operation.
  From one class, you can perform validation
  operations by one or more libraries

* Adding Constants
* Fix AttributeError When Mime Not Found
* Fix Value Error When Selected One Mime
* Fix Minor Problem

0.1.7 (2023-02-05)
------------------
* add ValidatedFileField (django)
* reach test 100%
* add size validator
* add file validator by django
* refactoring validators
* Improved code and performance
* add new documentation

0.1.8 (2023-02-05)
------------------
* improve and refactoring code

0.1.9 (2023-02-07)
------------------
* add file size validator (django)
* refactor and improve code

0.2.0 (2023-02-08)
------------------
* Fix Bug
