Metadata-Version: 2.4
Name: stapel-cdn
Version: 0.12.0
Summary: Media/CDN management Django app for the Stapel framework
License: MIT
Project-URL: Homepage, https://github.com/usestapel/stapel-cdn
Project-URL: Repository, https://github.com/usestapel/stapel-cdn
Project-URL: Documentation, https://github.com/usestapel/stapel-cdn#readme
Project-URL: Changelog, https://github.com/usestapel/stapel-cdn/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/usestapel/stapel-cdn/issues
Keywords: django,stapel,cdn,media,storage
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
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
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: stapel-core<1.0,>=0.26.0
Requires-Dist: celery>=5
Provides-Extra: s3
Requires-Dist: boto3>=1.34; extra == "s3"
Provides-Extra: images
Requires-Dist: pyvips>=2.2; extra == "images"
Provides-Extra: video
Provides-Extra: recordings
Provides-Extra: files
Provides-Extra: all
Requires-Dist: stapel-cdn[images,recordings,s3,video]; extra == "all"
Provides-Extra: test
Requires-Dist: Pillow>=9.0; extra == "test"
Dynamic: license-file

# stapel-cdn

[![CI](https://img.shields.io/github/actions/workflow/status/usestapel/stapel-cdn/ci.yml?branch=main&logo=github&label=CI)](https://github.com/usestapel/stapel-cdn/actions/workflows/ci.yml?query=branch%3Amain)
[![coverage](https://img.shields.io/codecov/c/github/usestapel/stapel-cdn?branch=main&logo=codecov&label=coverage)](https://app.codecov.io/gh/usestapel/stapel-cdn)
[![pypi](https://img.shields.io/pypi/v/stapel-cdn?logo=pypi&logoColor=white&label=pypi)](https://pypi.org/project/stapel-cdn/)
[![downloads](https://static.pepy.tech/badge/stapel-cdn/month)](https://pepy.tech/project/stapel-cdn)
[![python](https://img.shields.io/pypi/pyversions/stapel-cdn?logo=python&logoColor=white)](https://pypi.org/project/stapel-cdn/)
[![license](https://img.shields.io/github/license/usestapel/stapel-cdn)](https://github.com/usestapel/stapel-cdn/blob/main/LICENSE)
[![llms.txt](https://img.shields.io/badge/llms.txt-blue)](https://github.com/usestapel/stapel-cdn/blob/main/docs/llms.txt)

> Media management — image/video/file/audio upload, processing, CDN ref tracking

Part of the [Stapel framework](https://github.com/usestapel) — composable Django apps for building production-grade platforms.

## Installation

```bash
pip install stapel-cdn
# + media submodules, as needed:
pip install 'stapel-cdn[images]'      # libvips-backed image processing (system: apt libvips-dev)
pip install 'stapel-cdn[video]'       # video submodule marker — ffmpeg is a system binary, VPS/prod only
pip install 'stapel-cdn[recordings]'  # recordings (audio) submodule marker — storage always works;
                                       # ffmpeg-audio compression is a separate, not-yet-implemented opt-in
```

## Quick start

```python
# settings.py
INSTALLED_APPS = [
    ...
    'stapel_cdn',
]

STAPEL_CDN = {
    "ASSET_TYPES": ("avatar",),          # zero-infra default; add your own types here
    "ENABLED_SUBMODULES": ("images",),   # add "video" / "recordings" once you actually use them
}
```

`manage.py check` (tag `stapel_cdn`) fails loudly if an enabled submodule's system
binary/library is missing — see [MODULE.md](MODULE.md) and [CONFIG.MD](CONFIG.MD) for
the full submodule table and settings registry.

## Bus events

### Consumes
| `user.deleted` | [schema](schemas/consumes/user.deleted.json) |
| `user.deletion_initiated` | [schema](schemas/consumes/user.deletion_initiated.json) |

## License

MIT — see [LICENSE](LICENSE)
