scim2-models 0.4.1__py3-none-any.whl → 0.5.0__py3-none-any.whl

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.
@@ -14,7 +14,6 @@ from ..annotations import Required
14
14
  from ..annotations import Returned
15
15
  from ..annotations import Uniqueness
16
16
  from ..attributes import ComplexAttribute
17
- from ..attributes import MultiValuedComplexAttribute
18
17
  from ..reference import ExternalReference
19
18
  from ..reference import Reference
20
19
  from ..utils import Base64Bytes
@@ -48,7 +47,7 @@ class Name(ComplexAttribute):
48
47
  languages (e.g., 'III' given the full name 'Ms. Barbara J Jensen, III')."""
49
48
 
50
49
 
51
- class Email(MultiValuedComplexAttribute):
50
+ class Email(ComplexAttribute):
52
51
  class Type(str, Enum):
53
52
  work = "work"
54
53
  home = "home"
@@ -69,7 +68,7 @@ class Email(MultiValuedComplexAttribute):
69
68
  address."""
70
69
 
71
70
 
72
- class PhoneNumber(MultiValuedComplexAttribute):
71
+ class PhoneNumber(ComplexAttribute):
73
72
  class Type(str, Enum):
74
73
  work = "work"
75
74
  home = "home"
@@ -96,7 +95,7 @@ class PhoneNumber(MultiValuedComplexAttribute):
96
95
  number."""
97
96
 
98
97
 
99
- class Im(MultiValuedComplexAttribute):
98
+ class Im(ComplexAttribute):
100
99
  class Type(str, Enum):
101
100
  aim = "aim"
102
101
  gtalk = "gtalk"
@@ -124,7 +123,7 @@ class Im(MultiValuedComplexAttribute):
124
123
  for this attribute, e.g., the preferred messenger or primary messenger."""
125
124
 
126
125
 
127
- class Photo(MultiValuedComplexAttribute):
126
+ class Photo(ComplexAttribute):
128
127
  class Type(str, Enum):
129
128
  photo = "photo"
130
129
  thumbnail = "thumbnail"
@@ -144,7 +143,7 @@ class Photo(MultiValuedComplexAttribute):
144
143
  for this attribute, e.g., the preferred photo or thumbnail."""
145
144
 
146
145
 
147
- class Address(MultiValuedComplexAttribute):
146
+ class Address(ComplexAttribute):
148
147
  class Type(str, Enum):
149
148
  work = "work"
150
149
  home = "home"
@@ -181,11 +180,22 @@ class Address(MultiValuedComplexAttribute):
181
180
  for this attribute, e.g., the preferred photo or thumbnail."""
182
181
 
183
182
 
184
- class Entitlement(MultiValuedComplexAttribute):
185
- pass
183
+ class Entitlement(ComplexAttribute):
184
+ value: Optional[str] = None
185
+ """The value of an entitlement."""
186
+
187
+ display: Optional[str] = None
188
+ """A human-readable name, primarily used for display purposes."""
189
+
190
+ type: Optional[str] = None
191
+ """A label indicating the attribute's function."""
192
+
193
+ primary: Optional[bool] = None
194
+ """A Boolean value indicating the 'primary' or preferred attribute value
195
+ for this attribute."""
186
196
 
187
197
 
188
- class GroupMembership(MultiValuedComplexAttribute):
198
+ class GroupMembership(ComplexAttribute):
189
199
  value: Annotated[Optional[str], Mutability.read_only] = None
190
200
  """The identifier of the User's group."""
191
201
 
@@ -206,14 +216,35 @@ class GroupMembership(MultiValuedComplexAttribute):
206
216
  'indirect'."""
207
217
 
208
218
 
209
- class Role(MultiValuedComplexAttribute):
210
- pass
219
+ class Role(ComplexAttribute):
220
+ value: Optional[str] = None
221
+ """The value of a role."""
222
+
223
+ display: Optional[str] = None
224
+ """A human-readable name, primarily used for display purposes."""
211
225
 
226
+ type: Optional[str] = None
227
+ """A label indicating the attribute's function."""
212
228
 
213
- class X509Certificate(MultiValuedComplexAttribute):
229
+ primary: Optional[bool] = None
230
+ """A Boolean value indicating the 'primary' or preferred attribute value
231
+ for this attribute."""
232
+
233
+
234
+ class X509Certificate(ComplexAttribute):
214
235
  value: Annotated[Optional[Base64Bytes], CaseExact.true] = None
215
236
  """The value of an X.509 certificate."""
216
237
 
238
+ display: Optional[str] = None
239
+ """A human-readable name, primarily used for display purposes."""
240
+
241
+ type: Optional[str] = None
242
+ """A label indicating the attribute's function."""
243
+
244
+ primary: Optional[bool] = None
245
+ """A Boolean value indicating the 'primary' or preferred attribute value
246
+ for this attribute."""
247
+
217
248
 
218
249
  class User(Resource[AnyExtension]):
219
250
  schemas: Annotated[list[str], Required.true] = [
scim2_models/urn.py CHANGED
@@ -1,18 +1,21 @@
1
1
  from typing import TYPE_CHECKING
2
2
  from typing import Any
3
3
  from typing import Optional
4
+ from typing import Union
4
5
 
5
6
  from .base import BaseModel
7
+ from .utils import _get_path_parts
6
8
  from .utils import _normalize_attribute_name
7
9
 
8
10
  if TYPE_CHECKING:
9
11
  from .base import BaseModel
12
+ from .resources.resource import Extension
10
13
  from .resources.resource import Resource
11
14
 
12
15
 
13
16
  def _get_or_create_extension_instance(
14
- model: "Resource", extension_class: type
15
- ) -> "BaseModel":
17
+ model: "Resource[Any]", extension_class: type
18
+ ) -> "Extension":
16
19
  """Get existing extension instance or create a new one."""
17
20
  extension_instance = model[extension_class]
18
21
  if extension_instance is None:
@@ -27,6 +30,16 @@ def _normalize_path(model: Optional[type["BaseModel"]], path: str) -> tuple[str,
27
30
 
28
31
  # Absolute URN
29
32
  if ":" in path:
33
+ if (
34
+ model
35
+ and issubclass(model, Resource)
36
+ and (
37
+ path in model.get_extension_models()
38
+ or path == model.model_fields["schemas"].default[0]
39
+ )
40
+ ):
41
+ return path, ""
42
+
30
43
  parts = path.rsplit(":", 1)
31
44
  return parts[0], parts[1]
32
45
 
@@ -40,7 +53,7 @@ def _normalize_path(model: Optional[type["BaseModel"]], path: str) -> tuple[str,
40
53
 
41
54
  def _validate_model_attribute(model: type["BaseModel"], attribute_base: str) -> None:
42
55
  """Validate that an attribute name or a sub-attribute path exist for a given model."""
43
- attribute_name, *sub_attribute_blocks = attribute_base.split(".")
56
+ attribute_name, *sub_attribute_blocks = _get_path_parts(attribute_base)
44
57
  sub_attribute_base = ".".join(sub_attribute_blocks)
45
58
 
46
59
  aliases = {field.validation_alias for field in model.model_fields.values()}
@@ -62,7 +75,7 @@ def _validate_model_attribute(model: type["BaseModel"], attribute_base: str) ->
62
75
 
63
76
 
64
77
  def _validate_attribute_urn(
65
- attribute_name: str, resource: type["Resource"]
78
+ attribute_name: str, resource: type["Resource[Any]"]
66
79
  ) -> Optional[str]:
67
80
  """Validate that an attribute urn is valid or not.
68
81
 
@@ -87,8 +100,8 @@ def _validate_attribute_urn(
87
100
 
88
101
 
89
102
  def _resolve_path_to_target(
90
- resource: "Resource", path: str
91
- ) -> tuple[Optional["BaseModel"], str]:
103
+ resource: "Resource[Any]", path: str
104
+ ) -> tuple[Optional[Union["Resource[Any]", "Extension"]], str]:
92
105
  """Resolve a path to a target and an attribute_path.
93
106
 
94
107
  The target can be the resource itself, or an extension object.
@@ -98,12 +111,17 @@ def _resolve_path_to_target(
98
111
  if not schema_urn:
99
112
  return resource, attr_path
100
113
 
114
+ if extension_class := resource.get_extension_model(schema_urn):
115
+ # Points to the extension root
116
+ if not attr_path:
117
+ return resource, extension_class.__name__
118
+
119
+ extension_instance = _get_or_create_extension_instance(
120
+ resource, extension_class
121
+ )
122
+ return extension_instance, attr_path
123
+
101
124
  if schema_urn in resource.schemas:
102
125
  return resource, attr_path
103
126
 
104
- extension_class = resource.get_extension_model(schema_urn)
105
- if not extension_class:
106
- return (None, "")
107
-
108
- extension_instance = _get_or_create_extension_instance(resource, extension_class)
109
- return extension_instance, attr_path
127
+ return (None, "")
scim2_models/utils.py CHANGED
@@ -1,5 +1,6 @@
1
1
  import base64
2
2
  import re
3
+ from typing import TYPE_CHECKING
3
4
  from typing import Annotated
4
5
  from typing import Literal
5
6
  from typing import Optional
@@ -10,6 +11,9 @@ from pydantic import EncoderProtocol
10
11
  from pydantic.alias_generators import to_snake
11
12
  from pydantic_core import PydanticCustomError
12
13
 
14
+ if TYPE_CHECKING:
15
+ from .base import BaseModel
16
+
13
17
  try:
14
18
  from types import UnionType
15
19
 
@@ -103,9 +107,7 @@ def _validate_scim_path_syntax(path: str) -> bool:
103
107
  """Check if path syntax is valid according to RFC 7644 simplified rules.
104
108
 
105
109
  :param path: The path to validate
106
- :type path: str
107
110
  :return: True if path syntax is valid, False otherwise
108
- :rtype: bool
109
111
  """
110
112
  if not path or not path.strip():
111
113
  return False
@@ -135,9 +137,7 @@ def _validate_scim_urn_syntax(path: str) -> bool:
135
137
  """Validate URN-based path format.
136
138
 
137
139
  :param path: The URN path to validate
138
- :type path: str
139
140
  :return: True if URN path format is valid, False otherwise
140
- :rtype: bool
141
141
  """
142
142
  # Basic URN validation: should start with urn:
143
143
  if not path.startswith("urn:"):
@@ -181,21 +181,21 @@ def _extract_field_name(path: str) -> Optional[str]:
181
181
  return path
182
182
 
183
183
 
184
- def _find_field_name(resource_class, attr_name: str) -> Optional[str]:
184
+ def _find_field_name(model_class: type["BaseModel"], attr_name: str) -> Optional[str]:
185
185
  """Find the actual field name in a resource class from an attribute name.
186
186
 
187
- Args:
188
- resource_class: The resource class to search in
189
- attr_name: The attribute name to find (e.g., "nickName")
190
-
191
- Returns:
192
- The actual field name if found (e.g., "nick_name"), None otherwise
193
-
187
+ :param resource_class: The resource class to search in
188
+ :param attr_name: The attribute name to find (e.g., "nickName")
189
+ :returns: The actual field name if found (e.g., "nick_name"), None otherwise
194
190
  """
195
191
  normalized_attr_name = _normalize_attribute_name(attr_name)
196
192
 
197
- for field_key in resource_class.model_fields:
193
+ for field_key in model_class.model_fields:
198
194
  if _normalize_attribute_name(field_key) == normalized_attr_name:
199
195
  return field_key
200
196
 
201
197
  return None
198
+
199
+
200
+ def _get_path_parts(path: str) -> list[str]:
201
+ return path.split(".")
@@ -0,0 +1,280 @@
1
+ Metadata-Version: 2.3
2
+ Name: scim2-models
3
+ Version: 0.5.0
4
+ Summary: SCIM2 models serialization and validation with pydantic
5
+ Keywords: scim,scim2,provisioning,pydantic,rfc7643,rfc7644
6
+ Author: Yaal Coop
7
+ Author-email: Yaal Coop <contact@yaal.coop>
8
+ License: Apache License
9
+ Version 2.0, January 2004
10
+ http://www.apache.org/licenses/
11
+
12
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
13
+
14
+ 1. Definitions.
15
+
16
+ "License" shall mean the terms and conditions for use, reproduction,
17
+ and distribution as defined by Sections 1 through 9 of this document.
18
+
19
+ "Licensor" shall mean the copyright owner or entity authorized by
20
+ the copyright owner that is granting the License.
21
+
22
+ "Legal Entity" shall mean the union of the acting entity and all
23
+ other entities that control, are controlled by, or are under common
24
+ control with that entity. For the purposes of this definition,
25
+ "control" means (i) the power, direct or indirect, to cause the
26
+ direction or management of such entity, whether by contract or
27
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
28
+ outstanding shares, or (iii) beneficial ownership of such entity.
29
+
30
+ "You" (or "Your") shall mean an individual or Legal Entity
31
+ exercising permissions granted by this License.
32
+
33
+ "Source" form shall mean the preferred form for making modifications,
34
+ including but not limited to software source code, documentation
35
+ source, and configuration files.
36
+
37
+ "Object" form shall mean any form resulting from mechanical
38
+ transformation or translation of a Source form, including but
39
+ not limited to compiled object code, generated documentation,
40
+ and conversions to other media types.
41
+
42
+ "Work" shall mean the work of authorship, whether in Source or
43
+ Object form, made available under the License, as indicated by a
44
+ copyright notice that is included in or attached to the work
45
+ (an example is provided in the Appendix below).
46
+
47
+ "Derivative Works" shall mean any work, whether in Source or Object
48
+ form, that is based on (or derived from) the Work and for which the
49
+ editorial revisions, annotations, elaborations, or other modifications
50
+ represent, as a whole, an original work of authorship. For the purposes
51
+ of this License, Derivative Works shall not include works that remain
52
+ separable from, or merely link (or bind by name) to the interfaces of,
53
+ the Work and Derivative Works thereof.
54
+
55
+ "Contribution" shall mean any work of authorship, including
56
+ the original version of the Work and any modifications or additions
57
+ to that Work or Derivative Works thereof, that is intentionally
58
+ submitted to Licensor for inclusion in the Work by the copyright owner
59
+ or by an individual or Legal Entity authorized to submit on behalf of
60
+ the copyright owner. For the purposes of this definition, "submitted"
61
+ means any form of electronic, verbal, or written communication sent
62
+ to the Licensor or its representatives, including but not limited to
63
+ communication on electronic mailing lists, source code control systems,
64
+ and issue tracking systems that are managed by, or on behalf of, the
65
+ Licensor for the purpose of discussing and improving the Work, but
66
+ excluding communication that is conspicuously marked or otherwise
67
+ designated in writing by the copyright owner as "Not a Contribution."
68
+
69
+ "Contributor" shall mean Licensor and any individual or Legal Entity
70
+ on behalf of whom a Contribution has been received by Licensor and
71
+ subsequently incorporated within the Work.
72
+
73
+ 2. Grant of Copyright License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ copyright license to reproduce, prepare Derivative Works of,
77
+ publicly display, publicly perform, sublicense, and distribute the
78
+ Work and such Derivative Works in Source or Object form.
79
+
80
+ 3. Grant of Patent License. Subject to the terms and conditions of
81
+ this License, each Contributor hereby grants to You a perpetual,
82
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
83
+ (except as stated in this section) patent license to make, have made,
84
+ use, offer to sell, sell, import, and otherwise transfer the Work,
85
+ where such license applies only to those patent claims licensable
86
+ by such Contributor that are necessarily infringed by their
87
+ Contribution(s) alone or by combination of their Contribution(s)
88
+ with the Work to which such Contribution(s) was submitted. If You
89
+ institute patent litigation against any entity (including a
90
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
91
+ or a Contribution incorporated within the Work constitutes direct
92
+ or contributory patent infringement, then any patent licenses
93
+ granted to You under this License for that Work shall terminate
94
+ as of the date such litigation is filed.
95
+
96
+ 4. Redistribution. You may reproduce and distribute copies of the
97
+ Work or Derivative Works thereof in any medium, with or without
98
+ modifications, and in Source or Object form, provided that You
99
+ meet the following conditions:
100
+
101
+ (a) You must give any other recipients of the Work or
102
+ Derivative Works a copy of this License; and
103
+
104
+ (b) You must cause any modified files to carry prominent notices
105
+ stating that You changed the files; and
106
+
107
+ (c) You must retain, in the Source form of any Derivative Works
108
+ that You distribute, all copyright, patent, trademark, and
109
+ attribution notices from the Source form of the Work,
110
+ excluding those notices that do not pertain to any part of
111
+ the Derivative Works; and
112
+
113
+ (d) If the Work includes a "NOTICE" text file as part of its
114
+ distribution, then any Derivative Works that You distribute must
115
+ include a readable copy of the attribution notices contained
116
+ within such NOTICE file, excluding those notices that do not
117
+ pertain to any part of the Derivative Works, in at least one
118
+ of the following places: within a NOTICE text file distributed
119
+ as part of the Derivative Works; within the Source form or
120
+ documentation, if provided along with the Derivative Works; or,
121
+ within a display generated by the Derivative Works, if and
122
+ wherever such third-party notices normally appear. The contents
123
+ of the NOTICE file are for informational purposes only and
124
+ do not modify the License. You may add Your own attribution
125
+ notices within Derivative Works that You distribute, alongside
126
+ or as an addendum to the NOTICE text from the Work, provided
127
+ that such additional attribution notices cannot be construed
128
+ as modifying the License.
129
+
130
+ You may add Your own copyright statement to Your modifications and
131
+ may provide additional or different license terms and conditions
132
+ for use, reproduction, or distribution of Your modifications, or
133
+ for any such Derivative Works as a whole, provided Your use,
134
+ reproduction, and distribution of the Work otherwise complies with
135
+ the conditions stated in this License.
136
+
137
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
138
+ any Contribution intentionally submitted for inclusion in the Work
139
+ by You to the Licensor shall be under the terms and conditions of
140
+ this License, without any additional terms or conditions.
141
+ Notwithstanding the above, nothing herein shall supersede or modify
142
+ the terms of any separate license agreement you may have executed
143
+ with Licensor regarding such Contributions.
144
+
145
+ 6. Trademarks. This License does not grant permission to use the trade
146
+ names, trademarks, service marks, or product names of the Licensor,
147
+ except as required for reasonable and customary use in describing the
148
+ origin of the Work and reproducing the content of the NOTICE file.
149
+
150
+ 7. Disclaimer of Warranty. Unless required by applicable law or
151
+ agreed to in writing, Licensor provides the Work (and each
152
+ Contributor provides its Contributions) on an "AS IS" BASIS,
153
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
154
+ implied, including, without limitation, any warranties or conditions
155
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
156
+ PARTICULAR PURPOSE. You are solely responsible for determining the
157
+ appropriateness of using or redistributing the Work and assume any
158
+ risks associated with Your exercise of permissions under this License.
159
+
160
+ 8. Limitation of Liability. In no event and under no legal theory,
161
+ whether in tort (including negligence), contract, or otherwise,
162
+ unless required by applicable law (such as deliberate and grossly
163
+ negligent acts) or agreed to in writing, shall any Contributor be
164
+ liable to You for damages, including any direct, indirect, special,
165
+ incidental, or consequential damages of any character arising as a
166
+ result of this License or out of the use or inability to use the
167
+ Work (including but not limited to damages for loss of goodwill,
168
+ work stoppage, computer failure or malfunction, or any and all
169
+ other commercial damages or losses), even if such Contributor
170
+ has been advised of the possibility of such damages.
171
+
172
+ 9. Accepting Warranty or Additional Liability. While redistributing
173
+ the Work or Derivative Works thereof, You may choose to offer,
174
+ and charge a fee for, acceptance of support, warranty, indemnity,
175
+ or other liability obligations and/or rights consistent with this
176
+ License. However, in accepting such obligations, You may act only
177
+ on Your own behalf and on Your sole responsibility, not on behalf
178
+ of any other Contributor, and only if You agree to indemnify,
179
+ defend, and hold each Contributor harmless for any liability
180
+ incurred by, or claims asserted against, such Contributor by reason
181
+ of your accepting any such warranty or additional liability.
182
+
183
+ END OF TERMS AND CONDITIONS
184
+
185
+ APPENDIX: How to apply the Apache License to your work.
186
+
187
+ To apply the Apache License to your work, attach the following
188
+ boilerplate notice, with the fields enclosed by brackets "[]"
189
+ replaced with your own identifying information. (Don't include
190
+ the brackets!) The text should be enclosed in the appropriate
191
+ comment syntax for the file format. We also recommend that a
192
+ file or class name and description of purpose be included on the
193
+ same "printed page" as the copyright notice for easier
194
+ identification within third-party archives.
195
+
196
+ Copyright [yyyy] [name of copyright owner]
197
+
198
+ Licensed under the Apache License, Version 2.0 (the "License");
199
+ you may not use this file except in compliance with the License.
200
+ You may obtain a copy of the License at
201
+
202
+ http://www.apache.org/licenses/LICENSE-2.0
203
+
204
+ Unless required by applicable law or agreed to in writing, software
205
+ distributed under the License is distributed on an "AS IS" BASIS,
206
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
207
+ See the License for the specific language governing permissions and
208
+ limitations under the License.
209
+ Classifier: Intended Audience :: Developers
210
+ Classifier: Development Status :: 3 - Alpha
211
+ Classifier: Programming Language :: Python :: 3.9
212
+ Classifier: Programming Language :: Python :: 3.10
213
+ Classifier: Programming Language :: Python :: 3.11
214
+ Classifier: Programming Language :: Python :: 3.12
215
+ Classifier: Programming Language :: Python :: 3.13
216
+ Classifier: Programming Language :: Python :: Implementation :: CPython
217
+ Classifier: License :: OSI Approved :: Apache Software License
218
+ Classifier: Environment :: Web Environment
219
+ Classifier: Programming Language :: Python
220
+ Classifier: Operating System :: OS Independent
221
+ Requires-Dist: pydantic[email]>=2.7.0
222
+ Requires-Python: >=3.9
223
+ Project-URL: changelog, https://scim2-models.readthedocs.io/en/latest/changelog.html
224
+ Project-URL: documentation, https://scim2-models.readthedocs.io
225
+ Project-URL: funding, https://github.com/sponsors/python-scim
226
+ Project-URL: repository, https://github.com/python-scim/scim2-models
227
+ Description-Content-Type: text/markdown
228
+
229
+ # scim2-models
230
+
231
+ [Pydantic](https://docs.pydantic.dev) models for SCIM schemas defined in [RFC7643](https://datatracker.ietf.org/doc/html/rfc7643.html) and [RFC7644](https://datatracker.ietf.org/doc/html/rfc7644.html).
232
+
233
+ This library provides utilities to parse and produce SCIM2 payloads, and handle them with native Python objects.
234
+ It aims to be used as a basis to build SCIM2 servers and clients.
235
+
236
+ ## What's SCIM anyway?
237
+
238
+ SCIM stands for System for Cross-domain Identity Management, and it is a provisioning protocol.
239
+ Provisioning is the action of managing a set of resources across different services, usually users and groups.
240
+ SCIM is often used between Identity Providers and applications in completion of standards like OAuth2 and OpenID Connect.
241
+ It allows users and groups creations, modifications and deletions to be synchronized between applications.
242
+
243
+ ## Installation
244
+
245
+ ```shell
246
+ pip install scim2-models
247
+ ```
248
+
249
+ ## Usage
250
+
251
+ Check the [tutorial](https://scim2-models.readthedocs.io/en/latest/tutorial.html) and the [reference](https://scim2-models.readthedocs.io/en/latest/reference.html) for more details.
252
+
253
+ ```python
254
+ from scim2_models import User
255
+ import datetime
256
+
257
+ payload = {
258
+ "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
259
+ "id": "2819c223-7f76-453a-919d-413861904646",
260
+ "userName": "bjensen@example.com",
261
+ "meta": {
262
+ "resourceType": "User",
263
+ "created": "2010-01-23T04:56:22Z",
264
+ "lastModified": "2011-05-13T04:42:34Z",
265
+ "version": 'W\\/"3694e05e9dff590"',
266
+ "location": "https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646",
267
+ },
268
+ }
269
+
270
+ user = User.model_validate(payload)
271
+ assert user.user_name == "bjensen@example.com"
272
+ assert user.meta.created == datetime.datetime(
273
+ 2010, 1, 23, 4, 56, 22, tzinfo=datetime.timezone.utc
274
+ )
275
+ ```
276
+
277
+ scim2-models belongs in a collection of SCIM tools developed by [Yaal Coop](https://yaal.coop),
278
+ with [scim2-client](https://github.com/python-scim/scim2-client),
279
+ [scim2-tester](https://github.com/python-scim/scim2-tester) and
280
+ [scim2-cli](https://github.com/python-scim/scim2-cli)
@@ -0,0 +1,29 @@
1
+ scim2_models/__init__.py,sha256=20008bfdcf785212aad1911739bdcb31981e11031f42174e5695860e71d2a57a,3201
2
+ scim2_models/annotations.py,sha256=a118e528bd5faab61f6bd52d68c7711797ce4fc09450dde6fab773bdfeda8920,3304
3
+ scim2_models/attributes.py,sha256=5a9ab6a04246a09b9d4592ceaa7990c321e7f3d067114c49bc2c32d274baa178,1759
4
+ scim2_models/base.py,sha256=4c611456f69766fe6eb91f89fed47a30a79a3e365e18addc2cde933e8b702676,20409
5
+ scim2_models/constants.py,sha256=f5e82af095b474502a3e783ce42887a07e53ea946d60bf3bfa00b40be20c1ac9,573
6
+ scim2_models/context.py,sha256=46380c22f58fafc7f8d6a6d52f5b236839e6f4644acab0ab81f0b89e9c3070c8,9149
7
+ scim2_models/messages/__init__.py,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
8
+ scim2_models/messages/bulk.py,sha256=b273c1ef6d95fccb20d4904571a4de116fec6be8edf8a1efe9f874ef53682828,2592
9
+ scim2_models/messages/error.py,sha256=fc81d4a05c25f9026220221c46485a5dfffd0bb4578225fb4cbff6e905c3a367,6304
10
+ scim2_models/messages/list_response.py,sha256=07e5c42c14e4b3a238e692a17804b91a8f71e480ca86b2c95aca82f32dc6d34b,2400
11
+ scim2_models/messages/message.py,sha256=aece1972be605e5f0a0ccb1c2ce60aa78b2983d96f1ffa37c3e467d91efa78dd,4118
12
+ scim2_models/messages/patch_op.py,sha256=643b2fb14dd740bd7da0c6555806931ecd88d75f83fddac9d63c44fbed2d7fad,21117
13
+ scim2_models/messages/search_request.py,sha256=eeffc02ee255eaa809fd50f985c76af4aa312058b00a01a3f50aab942ebde42a,4571
14
+ scim2_models/py.typed,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
15
+ scim2_models/reference.py,sha256=1f06d8d0f2c5d7a06eff5cdac576eca6304ffc2b53ad091a2b628b983d72703d,2422
16
+ scim2_models/resources/__init__.py,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
17
+ scim2_models/resources/enterprise_user.py,sha256=4d56b9692f9e2c7703930cabe7c85962c44a9340308d4694692161539d669f91,1806
18
+ scim2_models/resources/group.py,sha256=128b68e7ddc2953eb0a26efef1487d07d603578627f43cbb047e303b32b68d39,1422
19
+ scim2_models/resources/resource.py,sha256=e7081240a22f9e8f7600c021ac5aed90e51a37516318830de4e137ce154df5a4,17525
20
+ scim2_models/resources/resource_type.py,sha256=0e019e7d143d6d70c597502c30f6dfbb39c9a8cb217cac9459ba68d2fcecc9eb,3347
21
+ scim2_models/resources/schema.py,sha256=692eeaefcbf952e7258c5632d90aa3d34cc42fc90c50dbf1c74f81756240c423,10350
22
+ scim2_models/resources/service_provider_config.py,sha256=9de827d36b5f1222570db4349d8c5d785b14248a064526498fa9030b0630daa2,5487
23
+ scim2_models/resources/user.py,sha256=faf269b55bdd9089a08f133131ee92f7760d1bc066ab3aba5978cba1da2f631d,11624
24
+ scim2_models/scim_object.py,sha256=e9afa57fc88842194c63b94233b45c49d7b87f59040a7704d007bcb89e1169a0,2404
25
+ scim2_models/urn.py,sha256=2ea4e24678fadee6b28b850b49eb43a0834893fd8f0eaa3d9077c64c25766a24,4101
26
+ scim2_models/utils.py,sha256=b54a710fba69cfb6bf04c7754d00bd48e988375ee0c76d68ae313319d26bd23c,5765
27
+ scim2_models-0.5.0.dist-info/WHEEL,sha256=0f7d664a881437bddec71c703c3c2f01fd13581519f95130abcc96e296ef0426,79
28
+ scim2_models-0.5.0.dist-info/METADATA,sha256=059c7d8a77fb904d9cfb31ebe2a2d073134adb2d84e8003c0880ad0a11384df7,16484
29
+ scim2_models-0.5.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.8.11
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any