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.1
4.2.0
4.1.0
4.0.1
4.0.0
3.9.3
3.9.2
3.9.1
3.9.0
3.8.4
3.8.3
3.8.2
3.8.1
3.8.0
3.7.1
3.7.0
3.6.1
3.6.0
3.5.0
3.4.0
3.3.0
3.2.0
3.12.0
3.11.1
3.11.0
3.10.2
3.10.1
3.10.0
3.1.1
3.1.0
3.0.0
2.9.0
2.8.0
2.7.0
2.6.1
2.6.0
2.5.0
2.4.0
2.3.0
2.2.0
2.16.6
2.16.5
2.16.4
2.16.3
2.16.2
2.16.1
2.16.0
2.15.4
2.15.3
2.15.2
2.15.1
2.15.0
2.14.0
2.13.2
2.13.1
2.13.0
2.12.2
2.12.1
2.12.0
2.11.1
2.11.0
2.10.0
2.1.1
2.1.0
2.0.0
1.9.1
1.9.0
1.8.1
1.8.0
1.7.0
1.6.0
1.5.0
1.4.0
1.3.0
1.2.0
1.1.1
1.1.0
1.0.1
1.0.0
0.9.0
0.8.4
0.8.2
0.8.0
0.7.0
0.6.5
0.6.4
0.6.2
0.6.0
0.5.1
0.5.0
0.4.1
0.4.0
0.3.1
0.29.1
0.29.0
0.28.3
0.28.2
0.28.1
0.28.0
0.27.1
0.27.0
0.26.1
0.25.0
0.24.0
0.23.0
0.22.0
0.21.0
0.20.0
0.2.0
0.19.0
0.18.0
0.17.6
0.17.5
0.17.4
0.17.3
0.17.2
0.17.1
0.17.0
0.16.0
0.15.0
0.14.4
0.14.3
0.14.2
0.14.1
0.13.3
0.13.2
0.13.1
0.12.0
0.11.1
0.11.0
0.10.2
0.0.0
توضیحات
python-keycloak is a Python package providing access to the Keycloak API.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | Unix |
| نام فایل | python-keycloak-7.1.1 |
| نام | python-keycloak |
| نسخه کتابخانه | 7.1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Marcos Pereira |
| ایمیل نویسنده | marcospereira.mpj@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/python-keycloak/ |
| مجوز | MIT |
[](https://github.com/marcospereirampj/python-keycloak/)
[](http://python-keycloak.readthedocs.io/en/latest/?badge=latest)
# Python Keycloak
**python-keycloak** is a Python package providing access to the Keycloak API.
## Installation
Install via PyPI:
`$ pip install python-keycloak`
## Bug reports
Please report bugs and feature requests at
https://github.com/marcospereirampj/python-keycloak/issues
## Documentation
The documentation for python-keycloak is available on [readthedocs](http://python-keycloak.readthedocs.io).
## Keycloak version support
The library strives to always support Keycloak's latest version. Additionally to that, we also support 5 latest major versions of Keycloak,
in order to give our user base more time for smoother upgrades.
Current list of supported Keycloak versions:
- 26.X
- 25.X
- 24.X
- 23.X
- 22.X
## Python version support
We only support Python versions that have active or security support by the Python Software Foundation. You can find the list of active Python versions [here](https://endoflife.date/python).
## Example of Using Keycloak OpenID
```python
from keycloak import KeycloakOpenID
# Configure client
keycloak_openid = KeycloakOpenID(server_url="http://localhost:8080/auth/",
client_id="example_client",
realm_name="example_realm",
client_secret_key="secret")
# Get WellKnown
config_well_known = keycloak_openid.well_known()
# Get Code With Oauth Authorization Request
auth_url = keycloak_openid.auth_url(
redirect_uri="your_call_back_url",
scope="email",
state="your_state_info")
# Get Access Token With Code
access_token = keycloak_openid.token(
grant_type='authorization_code',
code='the_code_you_get_from_auth_url_callback',
redirect_uri="your_call_back_url")
# Get Token
token = keycloak_openid.token("user", "password")
token = keycloak_openid.token("user", "password", totp="012345")
# Get token using Token Exchange
token = keycloak_openid.exchange_token(token['access_token'], "my_client", "other_client", "some_user")
# Get Userinfo
userinfo = keycloak_openid.userinfo(token['access_token'])
# Refresh token
token = keycloak_openid.refresh_token(token['refresh_token'])
# Logout
keycloak_openid.logout(token['refresh_token'])
```
## Example of Using Keycloak Admin API
```python
from keycloak import KeycloakAdmin
from keycloak import KeycloakOpenIDConnection
keycloak_connection = KeycloakOpenIDConnection(
server_url="http://localhost:8080/",
username='example-admin',
password='secret',
realm_name="master",
user_realm_name="only_if_other_realm_than_master",
client_id="my_client",
client_secret_key="client-secret",
verify=True)
keycloak_admin = KeycloakAdmin(connection=keycloak_connection)
# Add user
new_user = keycloak_admin.create_user({"email": "example@example.com",
"username": "example@example.com",
"enabled": True,
"firstName": "Example",
"lastName": "Example"})
# Add user and raise exception if username already exists
# exist_ok currently defaults to True for backwards compatibility reasons
new_user = keycloak_admin.create_user({"email": "example@example.com",
"username": "example@example.com",
"enabled": True,
"firstName": "Example",
"lastName": "Example"},
exist_ok=False)
# Add user and set password
new_user = keycloak_admin.create_user({"email": "example@example.com",
"username": "example@example.com",
"enabled": True,
"firstName": "Example",
"lastName": "Example",
"credentials": [{"value": "secret","type": "password",}]})
```
For more details, see the documentation available on [readthedocs](http://python-keycloak.readthedocs.io).
نیازمندی
| مقدار | نام |
|---|---|
| - | aiofiles>=24.1.0 |
| - | deprecation>=2.1.0 |
| - | httpx>=0.23.2 |
| - | jwcrypto>=1.5.4 |
| - | requests>=2.20.0 |
| - | requests-toolbelt>=0.6.0 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <4,>=3.10 | Python |
نحوه نصب
نصب پکیج whl python-keycloak-7.1.1:
pip install python-keycloak-7.1.1.whl
نصب پکیج tar.gz python-keycloak-7.1.1:
pip install python-keycloak-7.1.1.tar.gz