Skip to main content

a packages for validate audio file in django

Project description

Django Audio Validator 🔉

This Library a Audio Validator For Django With MIME And Extension Use FileType Library

Feature 📌

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

How Use ? 👇

  1. First Install The Library Use The Command :

    pip install

  2. Import Library In Your Model :

    from audio_validator.validator import AudioValidator

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

    Audio Type Supported :

    • aac
    • midi
    • mp3
    • m4a
    • ogg
    • flac
    • wav
    • amr
    • aiff

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

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.1.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

django_audio_validator-0.0.1-py3-none-any.whl (4.0 kB view hashes)

Uploaded 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