rapidata 2.27.5__py3-none-any.whl → 2.27.6__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.

Potentially problematic release.


This version of rapidata might be problematic. Click here for more details.

Files changed (30) hide show
  1. rapidata/__init__.py +1 -1
  2. rapidata/api_client/__init__.py +19 -1
  3. rapidata/api_client/api/__init__.py +1 -0
  4. rapidata/api_client/api/client_api.py +319 -46
  5. rapidata/api_client/api/leaderboard_api.py +2506 -0
  6. rapidata/api_client/models/__init__.py +18 -1
  7. rapidata/api_client/models/client_model.py +191 -0
  8. rapidata/api_client/models/create_customer_client_result.py +89 -0
  9. rapidata/api_client/models/create_leaderboard_model.py +91 -0
  10. rapidata/api_client/models/create_leaderboard_participant_model.py +87 -0
  11. rapidata/api_client/models/create_leaderboard_participant_result.py +89 -0
  12. rapidata/api_client/models/create_leaderboard_result.py +87 -0
  13. rapidata/api_client/models/dynamic_client_registration_request.py +175 -0
  14. rapidata/api_client/models/get_leaderboard_by_id_result.py +91 -0
  15. rapidata/api_client/models/get_participant_by_id_result.py +102 -0
  16. rapidata/api_client/models/json_web_key.py +258 -0
  17. rapidata/api_client/models/json_web_key_set.py +115 -0
  18. rapidata/api_client/models/leaderboard_query_result.py +93 -0
  19. rapidata/api_client/models/leaderboard_query_result_paged_result.py +105 -0
  20. rapidata/api_client/models/participant_by_leaderboard.py +102 -0
  21. rapidata/api_client/models/participant_by_leaderboard_paged_result.py +105 -0
  22. rapidata/api_client/models/participant_status.py +39 -0
  23. rapidata/api_client/models/prompt_by_leaderboard_result.py +90 -0
  24. rapidata/api_client/models/prompt_by_leaderboard_result_paged_result.py +105 -0
  25. rapidata/api_client_README.md +29 -2
  26. rapidata/rapidata_client/validation/validation_set_manager.py +14 -0
  27. {rapidata-2.27.5.dist-info → rapidata-2.27.6.dist-info}/METADATA +1 -1
  28. {rapidata-2.27.5.dist-info → rapidata-2.27.6.dist-info}/RECORD +30 -11
  29. {rapidata-2.27.5.dist-info → rapidata-2.27.6.dist-info}/LICENSE +0 -0
  30. {rapidata-2.27.5.dist-info → rapidata-2.27.6.dist-info}/WHEEL +0 -0
@@ -0,0 +1,87 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class CreateLeaderboardResult(BaseModel):
26
+ """
27
+ CreateLeaderboardResult
28
+ """ # noqa: E501
29
+ id: StrictStr
30
+ __properties: ClassVar[List[str]] = ["id"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of CreateLeaderboardResult from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of CreateLeaderboardResult from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "id": obj.get("id")
84
+ })
85
+ return _obj
86
+
87
+
@@ -0,0 +1,175 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from rapidata.api_client.models.json_web_key_set import JsonWebKeySet
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class DynamicClientRegistrationRequest(BaseModel):
27
+ """
28
+ The request body for dynamic client registration.
29
+ """ # noqa: E501
30
+ redirect_uris: Optional[List[StrictStr]] = Field(default=None, description="Array of redirection URI strings for use in redirect-based flows such as the authorization code and implicit flows.")
31
+ grant_types: Optional[List[StrictStr]] = Field(default=None, description="Array of OAuth 2.0 grant type strings that the client can use at the token endpoint.")
32
+ response_types: Optional[List[StrictStr]] = Field(default=None, description="Array of the OAuth 2.0 response type strings that the client can use at the authorization endpoint.")
33
+ client_id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the client.")
34
+ client_name: Optional[StrictStr] = Field(default=None, description="Human-readable string name of the client to be presented to the end-user during authorization.")
35
+ client_uri: Optional[StrictStr] = Field(default=None, description="URL string of a web page providing information about the client.")
36
+ logo_uri: Optional[StrictStr] = Field(default=None, description="URL string that references a logo for the client.")
37
+ scope: Optional[StrictStr] = Field(default=None, description="String containing a space-separated list of scope values that the client can use when requesting access tokens.")
38
+ contacts: Optional[List[StrictStr]] = Field(default=None, description="Array of strings representing ways to contact people responsible for this client, typically email addresses.")
39
+ tos_uri: Optional[StrictStr] = Field(default=None, description="URL string that points to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.")
40
+ policy_uri: Optional[StrictStr] = Field(default=None, description="URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.")
41
+ jwks_uri: Optional[StrictStr] = Field(default=None, description="URL string referencing the client's JSON Web Key document, which contains the client's public keys.")
42
+ jwks: Optional[JsonWebKeySet] = None
43
+ __properties: ClassVar[List[str]] = ["redirect_uris", "grant_types", "response_types", "client_id", "client_name", "client_uri", "logo_uri", "scope", "contacts", "tos_uri", "policy_uri", "jwks_uri", "jwks"]
44
+
45
+ model_config = ConfigDict(
46
+ populate_by_name=True,
47
+ validate_assignment=True,
48
+ protected_namespaces=(),
49
+ )
50
+
51
+
52
+ def to_str(self) -> str:
53
+ """Returns the string representation of the model using alias"""
54
+ return pprint.pformat(self.model_dump(by_alias=True))
55
+
56
+ def to_json(self) -> str:
57
+ """Returns the JSON representation of the model using alias"""
58
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
+ return json.dumps(self.to_dict())
60
+
61
+ @classmethod
62
+ def from_json(cls, json_str: str) -> Optional[Self]:
63
+ """Create an instance of DynamicClientRegistrationRequest from a JSON string"""
64
+ return cls.from_dict(json.loads(json_str))
65
+
66
+ def to_dict(self) -> Dict[str, Any]:
67
+ """Return the dictionary representation of the model using alias.
68
+
69
+ This has the following differences from calling pydantic's
70
+ `self.model_dump(by_alias=True)`:
71
+
72
+ * `None` is only added to the output dict for nullable fields that
73
+ were set at model initialization. Other fields with value `None`
74
+ are ignored.
75
+ """
76
+ excluded_fields: Set[str] = set([
77
+ ])
78
+
79
+ _dict = self.model_dump(
80
+ by_alias=True,
81
+ exclude=excluded_fields,
82
+ exclude_none=True,
83
+ )
84
+ # override the default output from pydantic by calling `to_dict()` of jwks
85
+ if self.jwks:
86
+ _dict['jwks'] = self.jwks.to_dict()
87
+ # set to None if redirect_uris (nullable) is None
88
+ # and model_fields_set contains the field
89
+ if self.redirect_uris is None and "redirect_uris" in self.model_fields_set:
90
+ _dict['redirect_uris'] = None
91
+
92
+ # set to None if grant_types (nullable) is None
93
+ # and model_fields_set contains the field
94
+ if self.grant_types is None and "grant_types" in self.model_fields_set:
95
+ _dict['grant_types'] = None
96
+
97
+ # set to None if response_types (nullable) is None
98
+ # and model_fields_set contains the field
99
+ if self.response_types is None and "response_types" in self.model_fields_set:
100
+ _dict['response_types'] = None
101
+
102
+ # set to None if client_id (nullable) is None
103
+ # and model_fields_set contains the field
104
+ if self.client_id is None and "client_id" in self.model_fields_set:
105
+ _dict['client_id'] = None
106
+
107
+ # set to None if client_name (nullable) is None
108
+ # and model_fields_set contains the field
109
+ if self.client_name is None and "client_name" in self.model_fields_set:
110
+ _dict['client_name'] = None
111
+
112
+ # set to None if client_uri (nullable) is None
113
+ # and model_fields_set contains the field
114
+ if self.client_uri is None and "client_uri" in self.model_fields_set:
115
+ _dict['client_uri'] = None
116
+
117
+ # set to None if logo_uri (nullable) is None
118
+ # and model_fields_set contains the field
119
+ if self.logo_uri is None and "logo_uri" in self.model_fields_set:
120
+ _dict['logo_uri'] = None
121
+
122
+ # set to None if scope (nullable) is None
123
+ # and model_fields_set contains the field
124
+ if self.scope is None and "scope" in self.model_fields_set:
125
+ _dict['scope'] = None
126
+
127
+ # set to None if contacts (nullable) is None
128
+ # and model_fields_set contains the field
129
+ if self.contacts is None and "contacts" in self.model_fields_set:
130
+ _dict['contacts'] = None
131
+
132
+ # set to None if tos_uri (nullable) is None
133
+ # and model_fields_set contains the field
134
+ if self.tos_uri is None and "tos_uri" in self.model_fields_set:
135
+ _dict['tos_uri'] = None
136
+
137
+ # set to None if policy_uri (nullable) is None
138
+ # and model_fields_set contains the field
139
+ if self.policy_uri is None and "policy_uri" in self.model_fields_set:
140
+ _dict['policy_uri'] = None
141
+
142
+ # set to None if jwks_uri (nullable) is None
143
+ # and model_fields_set contains the field
144
+ if self.jwks_uri is None and "jwks_uri" in self.model_fields_set:
145
+ _dict['jwks_uri'] = None
146
+
147
+ return _dict
148
+
149
+ @classmethod
150
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
151
+ """Create an instance of DynamicClientRegistrationRequest from a dict"""
152
+ if obj is None:
153
+ return None
154
+
155
+ if not isinstance(obj, dict):
156
+ return cls.model_validate(obj)
157
+
158
+ _obj = cls.model_validate({
159
+ "redirect_uris": obj.get("redirect_uris"),
160
+ "grant_types": obj.get("grant_types"),
161
+ "response_types": obj.get("response_types"),
162
+ "client_id": obj.get("client_id"),
163
+ "client_name": obj.get("client_name"),
164
+ "client_uri": obj.get("client_uri"),
165
+ "logo_uri": obj.get("logo_uri"),
166
+ "scope": obj.get("scope"),
167
+ "contacts": obj.get("contacts"),
168
+ "tos_uri": obj.get("tos_uri"),
169
+ "policy_uri": obj.get("policy_uri"),
170
+ "jwks_uri": obj.get("jwks_uri"),
171
+ "jwks": JsonWebKeySet.from_dict(obj["jwks"]) if obj.get("jwks") is not None else None
172
+ })
173
+ return _obj
174
+
175
+
@@ -0,0 +1,91 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class GetLeaderboardByIdResult(BaseModel):
26
+ """
27
+ GetLeaderboardByIdResult
28
+ """ # noqa: E501
29
+ name: StrictStr
30
+ instruction: StrictStr
31
+ show_prompt: StrictBool = Field(alias="showPrompt")
32
+ __properties: ClassVar[List[str]] = ["name", "instruction", "showPrompt"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of GetLeaderboardByIdResult from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of GetLeaderboardByIdResult from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "name": obj.get("name"),
86
+ "instruction": obj.get("instruction"),
87
+ "showPrompt": obj.get("showPrompt")
88
+ })
89
+ return _obj
90
+
91
+
@@ -0,0 +1,102 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Union
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class GetParticipantByIdResult(BaseModel):
26
+ """
27
+ GetParticipantByIdResult
28
+ """ # noqa: E501
29
+ name: StrictStr
30
+ leaderboard_id: StrictStr = Field(alias="leaderboardId")
31
+ dataset_id: StrictStr = Field(alias="datasetId")
32
+ status: StrictStr
33
+ score: Union[StrictFloat, StrictInt]
34
+ __properties: ClassVar[List[str]] = ["name", "leaderboardId", "datasetId", "status", "score"]
35
+
36
+ @field_validator('status')
37
+ def status_validate_enum(cls, value):
38
+ """Validates the enum"""
39
+ if value not in set(['Created', 'Queued', 'Running', 'Completed']):
40
+ raise ValueError("must be one of enum values ('Created', 'Queued', 'Running', 'Completed')")
41
+ return value
42
+
43
+ model_config = ConfigDict(
44
+ populate_by_name=True,
45
+ validate_assignment=True,
46
+ protected_namespaces=(),
47
+ )
48
+
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.model_dump(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
57
+ return json.dumps(self.to_dict())
58
+
59
+ @classmethod
60
+ def from_json(cls, json_str: str) -> Optional[Self]:
61
+ """Create an instance of GetParticipantByIdResult from a JSON string"""
62
+ return cls.from_dict(json.loads(json_str))
63
+
64
+ def to_dict(self) -> Dict[str, Any]:
65
+ """Return the dictionary representation of the model using alias.
66
+
67
+ This has the following differences from calling pydantic's
68
+ `self.model_dump(by_alias=True)`:
69
+
70
+ * `None` is only added to the output dict for nullable fields that
71
+ were set at model initialization. Other fields with value `None`
72
+ are ignored.
73
+ """
74
+ excluded_fields: Set[str] = set([
75
+ ])
76
+
77
+ _dict = self.model_dump(
78
+ by_alias=True,
79
+ exclude=excluded_fields,
80
+ exclude_none=True,
81
+ )
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of GetParticipantByIdResult from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "name": obj.get("name"),
95
+ "leaderboardId": obj.get("leaderboardId"),
96
+ "datasetId": obj.get("datasetId"),
97
+ "status": obj.get("status"),
98
+ "score": obj.get("score")
99
+ })
100
+ return _obj
101
+
102
+