Metadata-Version: 2.5
Name: university-media
Version: 0.1.0
Summary: University Media: secure uploads, object storage, asynchronous audio/video/image processing, signed URLs and clips for the University platform.
Project-URL: Homepage, https://github.com/NzeStan/University
Project-URL: Documentation, https://github.com/NzeStan/University/blob/main/docs/modules/media.md
Project-URL: Source, https://github.com/NzeStan/University
Project-URL: Changelog, https://github.com/NzeStan/University/blob/main/CHANGELOG.md
Author-email: Ifeanyi Stanley <nnamaniifeanyi10@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: africa,django,drf,ffmpeg,media,s3,transcoding,university,uploads
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Framework :: Django :: 6.1
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: university-core<0.2,>=0.1
Provides-Extra: test
Requires-Dist: drf-spectacular>=0.27; extra == 'test'
Requires-Dist: pytest-cov>=5; extra == 'test'
Requires-Dist: pytest-django>=4.8; extra == 'test'
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# university-media

Secure media for the [University platform](https://github.com/NzeStan/University):
uploads, private object storage, asynchronous processing, signed streaming links and clips. This
is an optional *level two* module that depends only on `university-core`. It provides Core's media
library, so podcasts and other modules use media without importing it.

- **Uploads are validated by content signature** against per-kind allow-lists (audio, video,
  image, document), with size limits, quotas, dimension and duration limits, SHA-256 hashes and
  random storage names. Executables and active content are always rejected.
- **Object storage:** S3, MinIO or any Django storage. Large files can go straight to storage via
  presigned uploads and are verified before use.
- **Asynchronous processing** on the task backend. The built-in processor needs no tools;
  `FFmpegProcessor` makes MP3 renditions, 720p MP4s and poster frames, cuts clips, and runs
  sandboxed (no shell, timeouts, file-only protocols).
- **Signed, expiring links** with HTTP Range support for seeking, or the storage's own presigned
  or CDN URLs.
- **Clean-up:** orphaned and failed uploads are deleted, and purge removes a person's files.

```bash
pip install university-media
```

See [the module documentation](../../docs/modules/media.md).
