Metadata-Version: 2.1
Name: django-drf-keycloak-auth
Version: 0.0.2
Summary: Django app for Keycloak OAuth2 authentication with DRF.
Home-page: https://github.com/xiaobitipao/django-drf-keycloak-auth
Author: xiaobitipao
Author-email: xiaobitipao@gmail.com
License: MIT
Keywords: keycloak,django,djangorestframework,oauth2
Classifier: Framework :: Django
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-dotenv>=1.1.1
Requires-Dist: Django>=5.2.7
Requires-Dist: djangorestframework>=3.16.1
Requires-Dist: python-keycloak>=5.8.1
Requires-Dist: pydantic>=2.12.1
Requires-Dist: pydantic-settings>=2.11.0

# django-drf-keycloak-auth

When using `Django`, `DRF`, and `Keycloak` for authentication and permission management, `django-drf-keycloak-auth` can make your work easier.

## Getting Started

```bash
pip install django-drf-keycloak-auth

OR

uv add django-drf-keycloak-auth
```

## Usage

## Examples

## Deploy project(memo for developer)

### setuptools version

The latest `setuptools`(version 80.9.0) produces `.whl` files with a `METADATA` version of `2.4`. You can check this by running:

```bash
unzip -p dist/*.whl '*/METADATA' | sed -n '1,160p'
```

Note that `TestPyPI` and  `TestPyPI` only supports `METADATA` versions `1.0–2.2`. Therefore, if you plan to publish your package to `TestPyPI` or  `TestPyPI`, you should not use the latest `setuptools`.

### Deploy to TestPyPI

> Depending on the network environment, you may need to use a proxy.

```bash
# https://test.pypi.org/
expect interactive_deploy_test.expect
```

> Install `django-drf-keycloak-auth` from TestPyPI.
>
> ```bash
> uv pip uninstall django-drf-keycloak-auth
> 
> uv pip install --no-cache-dir \
>   --index-url https://pypi.org/simple \
>   --extra-index-url https://test.pypi.org/simple \
>   --index-strategy unsafe-best-match \
>   django-drf-keycloak-auth==0.0.1
> ```
>
> OR
>
> `uv pip install --index-url https://test.pypi.org/simple django-drf-keycloak-auth==0.0.1`

### Deploy to PyPI

> Depending on the network environment, you may need to use a proxy.

```bash
# https://pypi.org/
expect interactive_deploy.expect
```

### How to mark a version as yanked

```bash
twine yank <package_name> --version <version> --reason "Reason this release was yanked: Yanked due to <reason>"
```

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.1] - 2025-10-15

-   First commit(Only for test)

## [0.0.2] - 2025-10-17

-   Add drf-spectacular support

-   Update auth api
