mantelo 2.2.0__tar.gz → 2.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mantelo-2.2.1/.release-please-manifest.json +1 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/CHANGELOG.md +12 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/Makefile +2 -2
- {mantelo-2.2.0 → mantelo-2.2.1}/PKG-INFO +7 -6
- {mantelo-2.2.0 → mantelo-2.2.1}/README.md +4 -4
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/index.rst +2 -2
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo/connection.py +9 -0
- mantelo-2.2.1/mantelo/version.py +24 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo.egg-info/PKG-INFO +7 -6
- {mantelo-2.2.0 → mantelo-2.2.1}/tests/test_client.py +1 -1
- mantelo-2.2.0/.release-please-manifest.json +0 -1
- mantelo-2.2.0/mantelo/version.py +0 -16
- {mantelo-2.2.0 → mantelo-2.2.1}/.gitignore +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/.readthedocs.yaml +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/CODEOWNERS +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/CONTRIBUTING.md +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/LICENSE +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/MANIFEST.in +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docker-compose.yml +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/00-getting_started.rst +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/01-authentication.rst +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/02-making-calls.rst +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/03-examples.rst +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/04-faq.rst +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/90-api.rst +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/Makefile +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/_static/css/custom.css +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/_static/images/mantelo-128.png +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/_static/images/mantelo-256.png +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/_static/images/mantelo-512.png +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/_static/images/mantelo-social-preview.png +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/_static/images/mantelo-text-900.png +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/_static/images/mantelo.ico +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/_static/images/mantelo.svg +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/_templates/.gitkeep +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/_templates/layout.html +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/conf.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/docs/make.bat +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo/__init__.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo/client.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo/exceptions.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo/internal/__init__.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo/internal/api.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo/internal/serializers.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo/py.typed +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo.egg-info/SOURCES.txt +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo.egg-info/dependency_links.txt +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo.egg-info/requires.txt +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/mantelo.egg-info/top_level.txt +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/pyproject.toml +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/setup.cfg +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/tests/__init__.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/tests/conftest.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/tests/constants.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/tests/internal/test_api.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/tests/internal/test_serialiers.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/tests/realms/master-realm.json +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/tests/realms/orwell-realm.json +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/tests/test_connection.py +0 -0
- {mantelo-2.2.0 → mantelo-2.2.1}/tox.ini +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{".":"2.2.1"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.1](https://github.com/derlin/mantelo/compare/v2.2.0...v2.2.1) (2026-04-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🐛 Bug Fixes
|
|
7
|
+
|
|
8
|
+
* raise proper exception on invalid credentials on keycloak 26.6 ([1fce16a](https://github.com/derlin/mantelo/commit/1fce16ab47ce47f7f99bc9ca6460b5ae436caf21))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### 💬 Documentation
|
|
12
|
+
|
|
13
|
+
* remove duplicated `Instead,` ([1f2e3c0](https://github.com/derlin/mantelo/commit/1f2e3c0eedb79087c7d7fb28e44b9481ef65479a))
|
|
14
|
+
|
|
3
15
|
## [2.2.0](https://github.com/derlin/mantelo/compare/v2.1.1...v2.2.0) (2024-12-29)
|
|
4
16
|
|
|
5
17
|
**IMPORTANT**: This release removes the `slumber` dependency and integrates its functionality
|
|
@@ -34,9 +34,9 @@ lint: ## Run ruff to format and lint (inside docker).
|
|
|
34
34
|
docker run --rm -e LINT_FOLDER_PYTHON=mantelo -v $(CURDIR):/app divio/lint /bin/lint ${ARGS} --run=python
|
|
35
35
|
|
|
36
36
|
test: ## Run tests with tox (inside docker).
|
|
37
|
-
coverage erase
|
|
37
|
+
coverage erase || true
|
|
38
38
|
docker compose up -d --wait keycloak
|
|
39
|
-
docker compose run --
|
|
39
|
+
docker compose run tox bash -c "git config --system --add safe.directory /app && tox ${ARGS}"
|
|
40
40
|
coverage combine
|
|
41
41
|
coverage html
|
|
42
42
|
coverage xml
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: mantelo
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: ✨ Keycloak Admin REST Api Client for Python ✨
|
|
5
5
|
Author-email: Lucy Linder <lucy.derlin@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -245,6 +245,7 @@ Requires-Dist: sphinx-book-theme; extra == "docs"
|
|
|
245
245
|
Requires-Dist: sphinx-autoapi; extra == "docs"
|
|
246
246
|
Requires-Dist: sphinx-copybutton; extra == "docs"
|
|
247
247
|
Requires-Dist: sphinxext-opengraph; extra == "docs"
|
|
248
|
+
Dynamic: license-file
|
|
248
249
|
|
|
249
250
|
# mantelo: A Keycloak Admin REST Api Client for Python
|
|
250
251
|
|
|
@@ -260,10 +261,10 @@ Requires-Dist: sphinxext-opengraph; extra == "docs"
|
|
|
260
261
|
|
|
261
262
|
> Mantelo [manˈtelo], from German "*Mantel*", from Late Latin "*mantum*" means "*cloak*" in Esperanto.
|
|
262
263
|
|
|
263
|
-
It stays fresh and complete because it does not hard-code or wrap any endpoint. Instead,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
It stays fresh and complete because it does not hard-code or wrap any endpoint. Instead, it offers
|
|
265
|
+
a clean, object-oriented interface to the Keycloak RESTful API. Acting as a lightweight wrapper
|
|
266
|
+
around the popular [requests](https://requests.readthedocs.io/en/latest/) library, mantelo takes
|
|
267
|
+
care of all the boring details for you - like authentication (tokens and refresh tokens), URL
|
|
267
268
|
management, serialization, and request processing
|
|
268
269
|
|
|
269
270
|
Any endpoint your Keycloak supports, mantelo supports!
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
> Mantelo [manˈtelo], from German "*Mantel*", from Late Latin "*mantum*" means "*cloak*" in Esperanto.
|
|
14
14
|
|
|
15
|
-
It stays fresh and complete because it does not hard-code or wrap any endpoint. Instead,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
It stays fresh and complete because it does not hard-code or wrap any endpoint. Instead, it offers
|
|
16
|
+
a clean, object-oriented interface to the Keycloak RESTful API. Acting as a lightweight wrapper
|
|
17
|
+
around the popular [requests](https://requests.readthedocs.io/en/latest/) library, mantelo takes
|
|
18
|
+
care of all the boring details for you - like authentication (tokens and refresh tokens), URL
|
|
19
19
|
management, serialization, and request processing
|
|
20
20
|
|
|
21
21
|
Any endpoint your Keycloak supports, mantelo supports!
|
|
@@ -11,8 +11,8 @@ Mantelo: A Keycloak Admin REST Api Client for Python
|
|
|
11
11
|
Mantelo [manˈtelo], from German "*Mantel*", from Late Latin "*mantum*" means "*cloak*" in Esperanto.
|
|
12
12
|
|
|
13
13
|
It always stays **fresh** and **complete** because it does not hard-code or wrap any endpoint.
|
|
14
|
-
Instead,
|
|
15
|
-
|
|
14
|
+
Instead, it offers a clean, object-oriented interface to the Keycloak RESTful API. Acting as a
|
|
15
|
+
lightweight wrapper around the popular `requests <https://requests.readthedocs.io/en/latest/>`_
|
|
16
16
|
library, mantelo takes care of all the boring details for you - like authentication (tokens and
|
|
17
17
|
refresh tokens), URL management, serialization, and request processing [#mention]_.
|
|
18
18
|
|
|
@@ -214,6 +214,15 @@ class OpenidConnection(Connection, ABC):
|
|
|
214
214
|
resp = self.session.post(self.auth_url, data=data, auth=_NO_AUTH)
|
|
215
215
|
if resp.status_code == 401:
|
|
216
216
|
raise AuthenticationException(**resp.json(), response=resp)
|
|
217
|
+
if resp.status_code == 400:
|
|
218
|
+
# In Keycloak 26.6.0, invalid credentials returns 400
|
|
219
|
+
error = resp.json()
|
|
220
|
+
if (
|
|
221
|
+
error.get("error_description", "")
|
|
222
|
+
== "Invalid user credentials"
|
|
223
|
+
):
|
|
224
|
+
raise AuthenticationException(**error, response=resp)
|
|
225
|
+
|
|
217
226
|
resp.raise_for_status()
|
|
218
227
|
self._token = Token.from_dict(resp.json(), now=now)
|
|
219
228
|
_logger.debug(
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '2.2.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 2, 1)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = 'g19e2c97f3'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: mantelo
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: ✨ Keycloak Admin REST Api Client for Python ✨
|
|
5
5
|
Author-email: Lucy Linder <lucy.derlin@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -245,6 +245,7 @@ Requires-Dist: sphinx-book-theme; extra == "docs"
|
|
|
245
245
|
Requires-Dist: sphinx-autoapi; extra == "docs"
|
|
246
246
|
Requires-Dist: sphinx-copybutton; extra == "docs"
|
|
247
247
|
Requires-Dist: sphinxext-opengraph; extra == "docs"
|
|
248
|
+
Dynamic: license-file
|
|
248
249
|
|
|
249
250
|
# mantelo: A Keycloak Admin REST Api Client for Python
|
|
250
251
|
|
|
@@ -260,10 +261,10 @@ Requires-Dist: sphinxext-opengraph; extra == "docs"
|
|
|
260
261
|
|
|
261
262
|
> Mantelo [manˈtelo], from German "*Mantel*", from Late Latin "*mantum*" means "*cloak*" in Esperanto.
|
|
262
263
|
|
|
263
|
-
It stays fresh and complete because it does not hard-code or wrap any endpoint. Instead,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
It stays fresh and complete because it does not hard-code or wrap any endpoint. Instead, it offers
|
|
265
|
+
a clean, object-oriented interface to the Keycloak RESTful API. Acting as a lightweight wrapper
|
|
266
|
+
around the popular [requests](https://requests.readthedocs.io/en/latest/) library, mantelo takes
|
|
267
|
+
care of all the boring details for you - like authentication (tokens and refresh tokens), URL
|
|
267
268
|
management, serialization, and request processing
|
|
268
269
|
|
|
269
270
|
Any endpoint your Keycloak supports, mantelo supports!
|
|
@@ -118,7 +118,7 @@ def test_switch_realm(openid_connection_admin):
|
|
|
118
118
|
(403, lambda c: c.clients.get()),
|
|
119
119
|
(400, lambda c: c.users.post({"foo": "bar"})),
|
|
120
120
|
(400, lambda c: c.users.post({})),
|
|
121
|
-
(405, lambda c: c.groups.
|
|
121
|
+
(405, lambda c: c.groups.patch()),
|
|
122
122
|
(405, lambda c: c.users.put({})),
|
|
123
123
|
(404, lambda c: c.users("not-exist").get()),
|
|
124
124
|
(
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{".":"2.2.0"}
|
mantelo-2.2.0/mantelo/version.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# file generated by setuptools_scm
|
|
2
|
-
# don't change, don't track in version control
|
|
3
|
-
TYPE_CHECKING = False
|
|
4
|
-
if TYPE_CHECKING:
|
|
5
|
-
from typing import Tuple, Union
|
|
6
|
-
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
|
-
else:
|
|
8
|
-
VERSION_TUPLE = object
|
|
9
|
-
|
|
10
|
-
version: str
|
|
11
|
-
__version__: str
|
|
12
|
-
__version_tuple__: VERSION_TUPLE
|
|
13
|
-
version_tuple: VERSION_TUPLE
|
|
14
|
-
|
|
15
|
-
__version__ = version = '2.2.0'
|
|
16
|
-
__version_tuple__ = version_tuple = (2, 2, 0)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|