semvec/pypi-packages huggingface dataset:
django-saas-attachments 0.1.0
The attachments module for building a SaaS product with Django
License: BSD-3-Clause
Requires Python: >=3.12

# Django SaaS Attachments

The attachments module for building a SaaS product with Django.

## Install

```
pip install django-saas-attachments
```

Then add it into your Django project `settings.py`:

```python
INSTALLED_APPS = [
    # ...
    "saas",
    "saas_attachments",
]

SAAS_ATTACHMENTS = {
    "PROVIDERS": [
        {
            "backend": "saas_attachments.providers.s3.S3Provider",
            "options": {
                "name": "default",
                "bucket_name": "my-bucket",
                "region_name": "us-east-1",
                "access_key_id": "secret:AWS_ACCESS_KEY_ID",
                "secret_access_key": "secret:AWS_SECRET_ACCESS_KEY",
            }
        }
    ]
}
```

## Features

- **Tenant Isolation**: All attachments are linked to a tenant.
- **Async Uploads**: Uses presigned URLs for direct-to-storage uploads.
- **Media Types**: Specialized models for Image, Audio, and Video.
- **Provider Support**: Extensible storage provider system (S3 included).
- **Cleanup**: Built-in management command to clean up abandoned uploads.