Skip to main content

library for validating files in Python

Project description

pypi made with python license Build status Coverage Status python-versions pylint Downloads Badge codefactor codebeat badge 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 library

  • File validation using the python-magic library

  • File validation using the mimetypes library

  • File validation using the puremagic library

  • File validation simultaneously with all libraries

  • File Size validation

  • Provide ValidatedFilefield and FileValidator for file validation in Django

  • Supporting for all mimes

Where to report if we found a bug? 🪲

Can report the problem through this link

Where should I ask if I had any questions❓

Can you ask your questions through this link

Where to read the documentation? 📄

Can you read the documentation through this link

Credits

This library was created By Reza Shakeri

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

file_validator-0.2.0.tar.gz (13.2 kB view hashes)

Uploaded Source

Built Distribution

file_validator-0.2.0-py2.py3-none-any.whl (11.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page