Metadata-Version: 2.5
Name: dpdpkit-django
Version: 0.1.0a2
Summary: Django app for dpdpkit: DPDP consent, notices, rights requests, retention and an admin request queue.
Project-URL: Homepage, https://github.com/dpdpkit-dev/dpdpkit-django
Project-URL: Documentation, https://dpdpkit-dev.github.io/dpdpkit-docs/dev/
Project-URL: Changelog, https://github.com/dpdpkit-dev/dpdpkit-django/blob/main/CHANGELOG.md
Author: dpdpkit maintainers
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: consent,django,dpdp,india,privacy
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: django>=4.2
Requires-Dist: dpdpkit-core<0.2,>=0.1.0a2
Provides-Extra: celery
Requires-Dist: celery>=5.3; extra == 'celery'
Provides-Extra: dev
Requires-Dist: django-stubs>=5; extra == 'dev'
Requires-Dist: djangorestframework-stubs>=3.14; extra == 'dev'
Requires-Dist: djangorestframework>=3.14; extra == 'dev'
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pytest-django>=4.8; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Provides-Extra: drf
Requires-Dist: djangorestframework>=3.14; extra == 'drf'
Provides-Extra: mysql
Requires-Dist: mysqlclient>=2.2; extra == 'mysql'
Provides-Extra: postgres
Requires-Dist: psycopg[binary]>=3.1; extra == 'postgres'
Description-Content-Type: text/markdown

# dpdpkit-django

Django app for [dpdpkit](https://github.com/dpdpkit-dev). It will add consent, versioned notices, rights requests and retention to your Django project, with tables in your own database.

> **Disclaimer.** dpdpkit is software that helps you implement obligations under India's Digital Personal
> Data Protection Act, 2023 and the DPDP Rules, 2025. It does not provide legal advice and does not
> guarantee compliance. Decisions about notices, purposes, retention and incident reporting must be made
> by you or your counsel.

## Status

**Alpha.** Version 0.1.0a2 is the first working pre-release (`pip install --pre dpdpkit-django`). APIs can still
change between pre-releases.

It includes the `dpdpkit.django` app with models, migrations and `DjangoRepository`, an
implementation of the dpdpkit `Repository` on the Django ORM (Postgres, MySQL, SQLite), and the dpdpkit REST
contract as URLs and views (`include("dpdpkit.django.urls")`; a DRF viewset when `rest_framework` is installed,
plain JSON views otherwise), configured through `settings.DPDPKIT`, and consent checks for views:
`@requires_consent("marketing")` for function views and `RequiresConsentMixin` (`consent_purposes = ("marketing",)`)
for class-based views. With `django.contrib.admin` installed you also get a read-only compliance back-office: a
request queue with SLA countdowns, consent and audit ledger viewers, a retention monitor and a legal-hold list.
Scheduled work runs from cron with the management commands `dpdp_run_retention`, `dpdp_verify_ledger` (exits
non-zero when a ledger chain is broken) and `dpdp_export` (`--principal`, `--evidence-pack`, `--root-file`), or from
Celery beat with the tasks in `dpdpkit.django.tasks` (`pip install "dpdpkit-django[celery]"`). For app-specific hooks
there are the signals `consent_withdrawn`, `erasure_due` and `request_opened` (`dpdpkit.django.signals`), and for
server-rendered sites the template tags `{% dpdp_notice %}` and `{% dpdp_preferences %}` (`{% load dpdpkit %}`).
A runnable ed-tech demo with a parent/guardian consent flow for child accounts is in
[`examples/django-school`](examples/django-school).

Documentation:
https://dpdpkit-dev.github.io/dpdpkit-docs/dev/

## License

Apache-2.0. See [LICENSE](LICENSE). Contributions need a DCO sign-off; see [CONTRIBUTING.md](CONTRIBUTING.md).
