Metadata-Version: 2.5
Name: shellui-django
Version: 0.7.1
Summary: Shared Django libraries for Shellui services
Project-URL: Homepage, https://shellui.com
Project-URL: Source, https://github.com/shellui/django-commons
Project-URL: Documentation, https://github.com/shellui/django-commons/tree/main/docs
Project-URL: Changelog, https://github.com/shellui/django-commons/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/shellui/django-commons/issues
Author: Sébastien Barbier
License-Expression: MIT
License-File: LICENSE
Keywords: django,djangorestframework,mcp,opentelemetry,shellui
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 6.0
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Security
Requires-Python: >=3.14
Requires-Dist: django==6.0.8
Requires-Dist: djangorestframework==3.18.2
Provides-Extra: mcp
Requires-Dist: cryptography>=50.0.0; extra == 'mcp'
Requires-Dist: djangorestframework-simplejwt==5.5.1; extra == 'mcp'
Requires-Dist: pyjwt>=2.14.0; extra == 'mcp'
Requires-Dist: requests>=2.32.0; extra == 'mcp'
Provides-Extra: otel
Requires-Dist: opentelemetry-api==1.45.2; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.45.2; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-celery==0.66b2; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-django[asgi]==0.66b2; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-logging==0.66b2; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-psycopg==0.66b2; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-redis==0.66b2; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-requests==0.66b2; extra == 'otel'
Requires-Dist: opentelemetry-sdk==1.45.2; extra == 'otel'
Description-Content-Type: text/markdown

# shellui-django

[![CI](https://github.com/shellui/django-commons/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/shellui/django-commons/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/shellui-django)](https://pypi.org/project/shellui-django/)
[![Python](https://img.shields.io/pypi/pyversions/shellui-django)](https://pypi.org/project/shellui-django/)
[![License: MIT](https://img.shields.io/github/license/shellui/django-commons)](LICENSE)

Shared Django libraries for [Shellui](https://shellui.com) backend services: identity, email, storage, hosting, saas, ai, and marketplace.

## Principles

- Only code duplicated in two or more services belongs here.
- Optional modules. Install what you need via extras (for example `[mcp]`).
- No shared Django models or migrations for now.
- [Semantic versioning](https://semver.org/). Services pin a compatible version range.

## Install

```bash
pip install shellui-django
pip install shellui-django[mcp]    # MCP server helpers
pip install shellui-django[otel]   # OpenTelemetry traces, metrics, and log correlation
```

Requires Python 3.14+, Django, and DRF. The `[mcp]` extra adds PyJWT, cryptography, SimpleJWT, and requests for MCP auth, signed internal calls, and the aggregating gateway. The `[otel]` extra adds the OpenTelemetry SDK, the OTLP/HTTP exporter, and instrumentation for Django, psycopg, redis, requests, Celery, and logging. See [docs/telemetry.md](docs/telemetry.md).

## Modules

| Module | Description |
|--------|-------------|
| [`shellui_django.mcp`](docs/mcp.md) | Turn a DRF OpenAPI schema into a secure multi-tenant MCP HTTP server. |
| [`shellui_django.telemetry`](docs/telemetry.md) | Traces, metrics, and log correlation for Shellui services. |
| [`shellui_django.testing`](docs/testing.md) | Shared test helpers (planned). |

## Contributing and releases

1. Open pull requests against `develop`.
2. Merge `develop` into `main` when ready to release.
3. Tag `vX.Y.Z` on `main`. GitHub Actions publishes `shellui-django` to PyPI via [trusted publishing](https://docs.pypi.org/trusted-publishers/).

Run checks locally:

```bash
uv sync --all-groups
uv run pytest
uv run ruff check src
uv build
```

## Security

Report vulnerabilities as described in [SECURITY.md](SECURITY.md). Do not open public issues for undisclosed security problems.

## License

MIT. See [LICENSE](LICENSE).
