Skip to main content

a packages for validate audio file in django

Project description

PyPI - Downloads

Django Audio Validator 🔉

This Library a Audio Validator For Django With d MIME type checking the magic numbers signature And Extension Use FileType Library

Feature 📌

  1. Audio File Type Check Use MIME Type
  2. Audio File Extension Check

Audio Type Supported ✅

  • aac - audio/aac
  • midi - audio/midi
  • mp3 - audio/mpeg
  • m4a - audio/mp4
  • ogg - audio/ogg
  • flac - audio/x-flac
  • wav - audio/x-wav
  • amr - audio/amr
  • aiff - audio/x-aiff

How Use ? 👇

  1. First Install The Library Use The Command :

    pip install django-audio-validator

  2. Import Library In Your Model :

    from audio_validator.validator import AudioValidator

  3. Pass Validator To Your Model And Set Type Of Audio :

    Template : AudioValidator("Audio Type Supported")

    Code Example :

    class Attachment(models.Model):
    
        audio = models.FileField(
            upload_to=user_directory_path,
            blank=True,
            validators=[AudioValidator("mp3")],
        )
        created_at = models.DateTimeField(auto_now_add=True)
    

Contribute This Project 🔗

If you would like to help me develop this project, you can do so through this link

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

django-audio-validator-0.0.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

django_audio_validator-0.0.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file django-audio-validator-0.0.3.tar.gz.

File metadata

File hashes

Hashes for django-audio-validator-0.0.3.tar.gz
Algorithm Hash digest
SHA256 20aabb444e4290d38a54fee24908f0e9fd9c3dc680a76a2f5096d26d3390b4be
MD5 fc4cba9b44d0e3867e02752914d7dc01
BLAKE2b-256 e1a69aa828d8fff23fea99d7447a1bedd22499e72e4be29ca870737ac3b47d06

See more details on using hashes here.

File details

Details for the file django_audio_validator-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_audio_validator-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7794e2cc4f0ec6c3ebcb04442dd66a5a7a646f598a020475fe741d36feb08088
MD5 836bc00db254f5e62e754a436534d864
BLAKE2b-256 d7672f998cf8f30fbeebb39eaa0f0a748f84f47e9010c8ca6e475fc7a8c137a8

See more details on using hashes here.

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