python-keycloak-api-client


Namepython-keycloak-api-client JSON
Version 0.13.0 PyPI version JSON
download
home_pagehttps://github.com/masterplandev/python-keycloak-api-client
SummaryClient for Keycloak Api (mostly users and impersonation)
upload_time2024-11-15 09:48:38
maintainerNone
docs_urlNone
authorSzymon Marcinkowski
requires_pythonNone
licenseMIT
keywords keycloak client api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python Keycloak API client

[![PyPI version](https://badge.fury.io/py/python-keycloak-api-client.svg)](https://badge.fury.io/py/python-keycloak-api-client) [![CircleCI](https://dl.circleci.com/status-badge/img/gh/masterplandev/python-keycloak-api-client/tree/main.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/masterplandev/python-keycloak-api-client/tree/main)

This library wraps the Keycloak REST API, providing an easy way to manage users, clients, and other Keycloak resources. It’s simple, extendable, and has been tested in production.

## Usage

### Install

```bash
$ pip install python-keycloak-api-client
```

### Example

```python
from keycloak_api_client import KeycloakApiClient

client = KeycloakApiClient(
    keycloak_url: "https://auth.myservice.com",
    realm: "myservice",
    admin_username: "my_keycloak_admin",
    admin_password: "...",
    admin_client_id: "my_service_backend_client_id",
    admin_client_secret: "...",
    relative_path: "/auth",
)

read_kc_user = client.get_keycloak_user_by_email('johndoe@myservice.com')
read_kc_user.email      # johndoe@myservice.com
read_kc_user.enabled    # True
read_kc_user.first_name # John
read_kc_user.last_name  # Doe
...
```

## Development

### Test

```bash
# Run linter and tests for all Python versions
$ tox
```

### Linter

```bash
# Format
$ ruff format

# Check
$ ruff check
```

### Install

```bash
$ pip install -e .
```

## Changelog

[CHANGELOG](CHANGELOG.md)

## License

[MIT](LICENSE)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/masterplandev/python-keycloak-api-client",
    "name": "python-keycloak-api-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "keycloak, client, api",
    "author": "Szymon Marcinkowski",
    "author_email": "szymon@masterhub.com",
    "download_url": "https://files.pythonhosted.org/packages/7f/93/9f1b199c2aa7fc988f23328350db5b8aa2c371d1d9b3e8707f9c67119baa/python-keycloak-api-client-0.13.0.tar.gz",
    "platform": null,
    "description": "# Python Keycloak API client\n\n[![PyPI version](https://badge.fury.io/py/python-keycloak-api-client.svg)](https://badge.fury.io/py/python-keycloak-api-client) [![CircleCI](https://dl.circleci.com/status-badge/img/gh/masterplandev/python-keycloak-api-client/tree/main.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/masterplandev/python-keycloak-api-client/tree/main)\n\nThis library wraps the Keycloak REST API, providing an easy way to manage users, clients, and other Keycloak resources. It\u2019s simple, extendable, and has been tested in production.\n\n## Usage\n\n### Install\n\n```bash\n$ pip install python-keycloak-api-client\n```\n\n### Example\n\n```python\nfrom keycloak_api_client import KeycloakApiClient\n\nclient = KeycloakApiClient(\n    keycloak_url: \"https://auth.myservice.com\",\n    realm: \"myservice\",\n    admin_username: \"my_keycloak_admin\",\n    admin_password: \"...\",\n    admin_client_id: \"my_service_backend_client_id\",\n    admin_client_secret: \"...\",\n    relative_path: \"/auth\",\n)\n\nread_kc_user = client.get_keycloak_user_by_email('johndoe@myservice.com')\nread_kc_user.email      # johndoe@myservice.com\nread_kc_user.enabled    # True\nread_kc_user.first_name # John\nread_kc_user.last_name  # Doe\n...\n```\n\n## Development\n\n### Test\n\n```bash\n# Run linter and tests for all Python versions\n$ tox\n```\n\n### Linter\n\n```bash\n# Format\n$ ruff format\n\n# Check\n$ ruff check\n```\n\n### Install\n\n```bash\n$ pip install -e .\n```\n\n## Changelog\n\n[CHANGELOG](CHANGELOG.md)\n\n## License\n\n[MIT](LICENSE)\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Client for Keycloak Api (mostly users and impersonation)",
    "version": "0.13.0",
    "project_urls": {
        "Homepage": "https://github.com/masterplandev/python-keycloak-api-client"
    },
    "split_keywords": [
        "keycloak",
        " client",
        " api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ecb042750f4f10aa9c932ec60d0303f4e6afe3b4eb3c28f88ad6a2fb0d8658f6",
                "md5": "d93e8e56a92b69d0c5991665bbc981fc",
                "sha256": "6fc8eeb49c9162e60504e587137632b868159c676aa481e08bb79b09ed887aef"
            },
            "downloads": -1,
            "filename": "python_keycloak_api_client-0.13.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d93e8e56a92b69d0c5991665bbc981fc",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 7847,
            "upload_time": "2024-11-15T09:48:37",
            "upload_time_iso_8601": "2024-11-15T09:48:37.278372Z",
            "url": "https://files.pythonhosted.org/packages/ec/b0/42750f4f10aa9c932ec60d0303f4e6afe3b4eb3c28f88ad6a2fb0d8658f6/python_keycloak_api_client-0.13.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f939f1b199c2aa7fc988f23328350db5b8aa2c371d1d9b3e8707f9c67119baa",
                "md5": "bfbabc25513a44cef2201da46683ed57",
                "sha256": "1ec865f63c0fc6ae7454d2f5181d3d402fdd78b6d4761e93fd9453d439ad6851"
            },
            "downloads": -1,
            "filename": "python-keycloak-api-client-0.13.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bfbabc25513a44cef2201da46683ed57",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 40568,
            "upload_time": "2024-11-15T09:48:38",
            "upload_time_iso_8601": "2024-11-15T09:48:38.128398Z",
            "url": "https://files.pythonhosted.org/packages/7f/93/9f1b199c2aa7fc988f23328350db5b8aa2c371d1d9b3e8707f9c67119baa/python-keycloak-api-client-0.13.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-15 09:48:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "masterplandev",
    "github_project": "python-keycloak-api-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "tox": true,
    "lcname": "python-keycloak-api-client"
}
        
Elapsed time: 1.18586s