Metadata-Version: 2.5
Name: university-core
Version: 0.1.0
Summary: University Core: the secure, modular foundation of an African campus platform built on Django REST Framework.
Project-URL: Homepage, https://github.com/NzeStan/University
Project-URL: Documentation, https://github.com/NzeStan/University/tree/main/docs
Project-URL: Source, https://github.com/NzeStan/University
Project-URL: Changelog, https://github.com/NzeStan/University/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/NzeStan/University/issues
Author-email: Ifeanyi Stanley <nnamaniifeanyi10@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: africa,campus,django,drf,modular,nigeria,platform,rest,university
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Framework :: Django :: 6.1
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
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: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Security
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: django<6.2,>=5.2
Requires-Dist: djangorestframework<4,>=3.15
Requires-Dist: pyjwt<3,>=2.8
Provides-Extra: all
Requires-Dist: argon2-cffi>=23.1; extra == 'all'
Requires-Dist: celery>=5.3; extra == 'all'
Requires-Dist: django-cors-headers>=4.3; extra == 'all'
Requires-Dist: drf-spectacular>=0.27; extra == 'all'
Requires-Dist: pillow>=10.0; extra == 'all'
Requires-Dist: psycopg[binary]>=3.1; extra == 'all'
Requires-Dist: pyjwt[crypto]<3,>=2.8; extra == 'all'
Requires-Dist: redis>=5.0; extra == 'all'
Provides-Extra: argon2
Requires-Dist: argon2-cffi>=23.1; extra == 'argon2'
Provides-Extra: celery
Requires-Dist: celery>=5.3; extra == 'celery'
Provides-Extra: cors
Requires-Dist: django-cors-headers>=4.3; extra == 'cors'
Provides-Extra: images
Requires-Dist: pillow>=10.0; extra == 'images'
Provides-Extra: oidc
Requires-Dist: pyjwt[crypto]<3,>=2.8; extra == 'oidc'
Provides-Extra: openapi
Requires-Dist: drf-spectacular>=0.27; extra == 'openapi'
Provides-Extra: postgres
Requires-Dist: psycopg[binary]>=3.1; extra == 'postgres'
Provides-Extra: redis
Requires-Dist: redis>=5.0; extra == 'redis'
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-core

**The secure, modular foundation of the University platform**: a Django REST Framework
platform for African campus ecosystems (Nigeria-first, Africa-ready).

`university-core` is the *level one* package. It provides five Django apps that nearly every
installation needs:

| App | Provides |
| --- | --- |
| `university.core` | UUID base models, soft deletion, namespaced settings, module registry and plugins, event bus, hooks, task abstraction, provider adapters (email, SMS, search, anti-spam), distributed rate limiting, idempotency, signed webhooks, secure uploads, health checks, structured logging, versioned API infrastructure, system checks, data retention |
| `university.users` | Swappable custom user model, accounts, verification, privacy/notification/security settings, consent, data export, soft deletion with anonymisation |
| `university.security` | JWT access tokens + rotating refresh tokens with reuse detection, sessions/devices, scoped API keys, lockout, suspicious-login alerts, OTP, MFA, passwordless, OIDC |
| `university.permissions` | Scoped RBAC with hierarchy resolution and privilege-escalation protection |
| `university.audit` | Append-only, HMAC-signed audit log |

Optional features come from *level two* packages such as
[`university-institution`](https://pypi.org/project/university-institution/).

## Install

```bash
pip install "university-core[postgres,redis,celery,openapi,argon2]"
```

```python
from university.core import CORE_APPS
from university.core.settings import recommended_middleware, rest_framework_settings

INSTALLED_APPS = [..., "rest_framework", *CORE_APPS]
MIDDLEWARE = recommended_middleware()
REST_FRAMEWORK = rest_framework_settings()
AUTH_USER_MODEL = "university_users.User"
AUTHENTICATION_BACKENDS = ["university.users.backends.UniversityAuthBackend"]
```

```python
urlpatterns = [path("", include("university.core.urls"))]  # /health/, /api/v1/, /api/docs/
```

Supported versions: Python 3.11–3.14; Django 5.2, 6.0, 6.1; DRF 3.15+.

Documentation, security policy and source: https://github.com/NzeStan/University
