rapidata 0.3.0__py3-none-any.whl → 0.4.1__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.
Files changed (72) hide show
  1. rapidata/__init__.py +18 -1
  2. rapidata/api_client/__init__.py +29 -3
  3. rapidata/api_client/api/__init__.py +3 -0
  4. rapidata/api_client/api/compare_workflow_api.py +316 -0
  5. rapidata/api_client/api/dataset_api.py +24 -24
  6. rapidata/api_client/api/order_api.py +515 -289
  7. rapidata/api_client/api/rapid_api.py +6 -6
  8. rapidata/api_client/api/simple_workflow_api.py +350 -0
  9. rapidata/api_client/api/validation_api.py +6 -6
  10. rapidata/api_client/api/workflow_api.py +2386 -0
  11. rapidata/api_client/api_client.py +2 -2
  12. rapidata/api_client/models/__init__.py +26 -3
  13. rapidata/api_client/models/admin_order_model.py +8 -1
  14. rapidata/api_client/models/age_group.py +1 -1
  15. rapidata/api_client/models/age_user_filter_model.py +2 -2
  16. rapidata/api_client/models/campaign_user_filter_model.py +2 -2
  17. rapidata/api_client/models/compare_workflow_get_result_overview_get200_response.py +137 -0
  18. rapidata/api_client/models/compare_workflow_model1.py +146 -0
  19. rapidata/api_client/models/completed_rapid_model.py +103 -0
  20. rapidata/api_client/models/country_user_filter_model.py +2 -2
  21. rapidata/api_client/models/create_demographic_rapid_model.py +3 -3
  22. rapidata/api_client/models/create_independent_workflow_model.py +93 -0
  23. rapidata/api_client/models/create_independent_workflow_model_workflow_config.py +140 -0
  24. rapidata/api_client/models/create_independent_workflow_result.py +89 -0
  25. rapidata/api_client/models/create_order_model.py +40 -31
  26. rapidata/api_client/models/create_order_model_selections_inner.py +24 -10
  27. rapidata/api_client/models/create_order_model_user_filters_inner.py +35 -35
  28. rapidata/api_client/models/customer_order_model.py +8 -1
  29. rapidata/api_client/models/demographic_rapid_selection_config.py +3 -3
  30. rapidata/api_client/models/demographic_selection.py +4 -4
  31. rapidata/api_client/models/feedback_model.py +1 -1
  32. rapidata/api_client/models/gender.py +1 -1
  33. rapidata/api_client/models/gender_user_filter_model.py +2 -2
  34. rapidata/api_client/models/get_attach_category_workflow_result_overview_result.py +144 -0
  35. rapidata/api_client/models/get_compare_workflow_result_overview_result.py +125 -0
  36. rapidata/api_client/models/get_compare_workflow_result_overview_small_result.py +114 -0
  37. rapidata/api_client/models/get_simple_workflow_result_overview_result.py +142 -0
  38. rapidata/api_client/models/get_workflow_by_id_result.py +91 -0
  39. rapidata/api_client/models/get_workflow_by_id_result_workflow.py +140 -0
  40. rapidata/api_client/models/get_workflow_progress_result.py +100 -0
  41. rapidata/api_client/models/get_workflow_result_overview_result.py +104 -0
  42. rapidata/api_client/models/i_workflow_model_paged_result.py +105 -0
  43. rapidata/api_client/models/in_progress_rapid_model.py +103 -0
  44. rapidata/api_client/models/labeling_selection.py +2 -2
  45. rapidata/api_client/models/language_user_filter_model.py +2 -2
  46. rapidata/api_client/models/not_started_rapid_model.py +93 -0
  47. rapidata/api_client/models/order_state.py +43 -0
  48. rapidata/api_client/models/query_workflows_model.py +112 -0
  49. rapidata/api_client/models/ranked_datapoint_model.py +95 -0
  50. rapidata/api_client/models/rapid_answer.py +97 -0
  51. rapidata/api_client/models/rapid_answer_result.py +252 -0
  52. rapidata/api_client/models/simple_workflow_get_result_overview_get200_response.py +137 -0
  53. rapidata/api_client/models/simple_workflow_model1.py +140 -0
  54. rapidata/api_client/models/static_selection.py +96 -0
  55. rapidata/api_client/models/user_score_user_filter_model.py +3 -3
  56. rapidata/api_client/models/validation_selection.py +3 -3
  57. rapidata/api_client/models/workflow_state.py +41 -0
  58. rapidata/api_client/rest.py +1 -1
  59. rapidata/api_client_README.md +44 -8
  60. rapidata/rapidata_client/__init__.py +7 -1
  61. rapidata/rapidata_client/country_codes/__init__.py +1 -1
  62. rapidata/rapidata_client/feature_flags/__init__.py +1 -1
  63. rapidata/rapidata_client/metadata/__init__.py +5 -0
  64. rapidata/rapidata_client/order/rapidata_order_builder.py +20 -2
  65. rapidata/rapidata_client/rapidata_client.py +22 -0
  66. rapidata/rapidata_client/referee/__init__.py +3 -3
  67. rapidata/rapidata_client/selection/__init__.py +4 -0
  68. rapidata/rapidata_client/workflow/__init__.py +5 -4
  69. {rapidata-0.3.0.dist-info → rapidata-0.4.1.dist-info}/METADATA +1 -1
  70. {rapidata-0.3.0.dist-info → rapidata-0.4.1.dist-info}/RECORD +72 -43
  71. {rapidata-0.3.0.dist-info → rapidata-0.4.1.dist-info}/LICENSE +0 -0
  72. {rapidata-0.3.0.dist-info → rapidata-0.4.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,137 @@
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 json
17
+ import pprint
18
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
19
+ from typing import Any, List, Optional
20
+ from rapidata.api_client.models.get_attach_category_workflow_result_overview_result import GetAttachCategoryWorkflowResultOverviewResult
21
+ from rapidata.api_client.models.get_simple_workflow_result_overview_result import GetSimpleWorkflowResultOverviewResult
22
+ from pydantic import StrictStr, Field
23
+ from typing import Union, List, Set, Optional, Dict
24
+ from typing_extensions import Literal, Self
25
+
26
+ SIMPLEWORKFLOWGETRESULTOVERVIEWGET200RESPONSE_ONE_OF_SCHEMAS = ["GetAttachCategoryWorkflowResultOverviewResult", "GetSimpleWorkflowResultOverviewResult"]
27
+
28
+ class SimpleWorkflowGetResultOverviewGet200Response(BaseModel):
29
+ """
30
+ SimpleWorkflowGetResultOverviewGet200Response
31
+ """
32
+ # data type: GetAttachCategoryWorkflowResultOverviewResult
33
+ oneof_schema_1_validator: Optional[GetAttachCategoryWorkflowResultOverviewResult] = None
34
+ # data type: GetSimpleWorkflowResultOverviewResult
35
+ oneof_schema_2_validator: Optional[GetSimpleWorkflowResultOverviewResult] = None
36
+ actual_instance: Optional[Union[GetAttachCategoryWorkflowResultOverviewResult, GetSimpleWorkflowResultOverviewResult]] = None
37
+ one_of_schemas: Set[str] = { "GetAttachCategoryWorkflowResultOverviewResult", "GetSimpleWorkflowResultOverviewResult" }
38
+
39
+ model_config = ConfigDict(
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def __init__(self, *args, **kwargs) -> None:
46
+ if args:
47
+ if len(args) > 1:
48
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
49
+ if kwargs:
50
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
51
+ super().__init__(actual_instance=args[0])
52
+ else:
53
+ super().__init__(**kwargs)
54
+
55
+ @field_validator('actual_instance')
56
+ def actual_instance_must_validate_oneof(cls, v):
57
+ instance = SimpleWorkflowGetResultOverviewGet200Response.model_construct()
58
+ error_messages = []
59
+ match = 0
60
+ # validate data type: GetAttachCategoryWorkflowResultOverviewResult
61
+ if not isinstance(v, GetAttachCategoryWorkflowResultOverviewResult):
62
+ error_messages.append(f"Error! Input type `{type(v)}` is not `GetAttachCategoryWorkflowResultOverviewResult`")
63
+ else:
64
+ match += 1
65
+ # validate data type: GetSimpleWorkflowResultOverviewResult
66
+ if not isinstance(v, GetSimpleWorkflowResultOverviewResult):
67
+ error_messages.append(f"Error! Input type `{type(v)}` is not `GetSimpleWorkflowResultOverviewResult`")
68
+ else:
69
+ match += 1
70
+ if match > 1:
71
+ # more than 1 match
72
+ raise ValueError("Multiple matches found when setting `actual_instance` in SimpleWorkflowGetResultOverviewGet200Response with oneOf schemas: GetAttachCategoryWorkflowResultOverviewResult, GetSimpleWorkflowResultOverviewResult. Details: " + ", ".join(error_messages))
73
+ elif match == 0:
74
+ # no match
75
+ raise ValueError("No match found when setting `actual_instance` in SimpleWorkflowGetResultOverviewGet200Response with oneOf schemas: GetAttachCategoryWorkflowResultOverviewResult, GetSimpleWorkflowResultOverviewResult. Details: " + ", ".join(error_messages))
76
+ else:
77
+ return v
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
81
+ return cls.from_json(json.dumps(obj))
82
+
83
+ @classmethod
84
+ def from_json(cls, json_str: str) -> Self:
85
+ """Returns the object represented by the json string"""
86
+ instance = cls.model_construct()
87
+ error_messages = []
88
+ match = 0
89
+
90
+ # deserialize data into GetAttachCategoryWorkflowResultOverviewResult
91
+ try:
92
+ instance.actual_instance = GetAttachCategoryWorkflowResultOverviewResult.from_json(json_str)
93
+ match += 1
94
+ except (ValidationError, ValueError) as e:
95
+ error_messages.append(str(e))
96
+ # deserialize data into GetSimpleWorkflowResultOverviewResult
97
+ try:
98
+ instance.actual_instance = GetSimpleWorkflowResultOverviewResult.from_json(json_str)
99
+ match += 1
100
+ except (ValidationError, ValueError) as e:
101
+ error_messages.append(str(e))
102
+
103
+ if match > 1:
104
+ # more than 1 match
105
+ raise ValueError("Multiple matches found when deserializing the JSON string into SimpleWorkflowGetResultOverviewGet200Response with oneOf schemas: GetAttachCategoryWorkflowResultOverviewResult, GetSimpleWorkflowResultOverviewResult. Details: " + ", ".join(error_messages))
106
+ elif match == 0:
107
+ # no match
108
+ raise ValueError("No match found when deserializing the JSON string into SimpleWorkflowGetResultOverviewGet200Response with oneOf schemas: GetAttachCategoryWorkflowResultOverviewResult, GetSimpleWorkflowResultOverviewResult. Details: " + ", ".join(error_messages))
109
+ else:
110
+ return instance
111
+
112
+ def to_json(self) -> str:
113
+ """Returns the JSON representation of the actual instance"""
114
+ if self.actual_instance is None:
115
+ return "null"
116
+
117
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
118
+ return self.actual_instance.to_json()
119
+ else:
120
+ return json.dumps(self.actual_instance)
121
+
122
+ def to_dict(self) -> Optional[Union[Dict[str, Any], GetAttachCategoryWorkflowResultOverviewResult, GetSimpleWorkflowResultOverviewResult]]:
123
+ """Returns the dict representation of the actual instance"""
124
+ if self.actual_instance is None:
125
+ return None
126
+
127
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
128
+ return self.actual_instance.to_dict()
129
+ else:
130
+ # primitive type
131
+ return self.actual_instance
132
+
133
+ def to_str(self) -> str:
134
+ """Returns the string representation of the actual instance"""
135
+ return pprint.pformat(self.model_dump())
136
+
137
+
@@ -0,0 +1,140 @@
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, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from rapidata.api_client.models.compare_workflow_config_referee import CompareWorkflowConfigReferee
23
+ from rapidata.api_client.models.feature_flag import FeatureFlag
24
+ from rapidata.api_client.models.simple_workflow_config_blueprint import SimpleWorkflowConfigBlueprint
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class SimpleWorkflowModel1(BaseModel):
29
+ """
30
+ SimpleWorkflowModel1
31
+ """ # noqa: E501
32
+ t: StrictStr = Field(description="Discriminator value for SimpleWorkflowModel", alias="_t")
33
+ id: StrictStr
34
+ dataset_id: Optional[StrictStr] = Field(alias="datasetId")
35
+ target_country_codes: List[StrictStr] = Field(alias="targetCountryCodes")
36
+ feature_flags: List[FeatureFlag] = Field(alias="featureFlags")
37
+ state: StrictStr
38
+ priority: StrictStr
39
+ blueprint: SimpleWorkflowConfigBlueprint
40
+ referee: CompareWorkflowConfigReferee
41
+ name: StrictStr
42
+ owner_mail: Optional[StrictStr] = Field(alias="ownerMail")
43
+ __properties: ClassVar[List[str]] = ["_t", "id", "datasetId", "targetCountryCodes", "featureFlags", "state", "priority", "blueprint", "referee", "name", "ownerMail"]
44
+
45
+ @field_validator('t')
46
+ def t_validate_enum(cls, value):
47
+ """Validates the enum"""
48
+ if value not in set(['SimpleWorkflowModel']):
49
+ raise ValueError("must be one of enum values ('SimpleWorkflowModel')")
50
+ return value
51
+
52
+ model_config = ConfigDict(
53
+ populate_by_name=True,
54
+ validate_assignment=True,
55
+ protected_namespaces=(),
56
+ )
57
+
58
+
59
+ def to_str(self) -> str:
60
+ """Returns the string representation of the model using alias"""
61
+ return pprint.pformat(self.model_dump(by_alias=True))
62
+
63
+ def to_json(self) -> str:
64
+ """Returns the JSON representation of the model using alias"""
65
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
66
+ return json.dumps(self.to_dict())
67
+
68
+ @classmethod
69
+ def from_json(cls, json_str: str) -> Optional[Self]:
70
+ """Create an instance of SimpleWorkflowModel1 from a JSON string"""
71
+ return cls.from_dict(json.loads(json_str))
72
+
73
+ def to_dict(self) -> Dict[str, Any]:
74
+ """Return the dictionary representation of the model using alias.
75
+
76
+ This has the following differences from calling pydantic's
77
+ `self.model_dump(by_alias=True)`:
78
+
79
+ * `None` is only added to the output dict for nullable fields that
80
+ were set at model initialization. Other fields with value `None`
81
+ are ignored.
82
+ """
83
+ excluded_fields: Set[str] = set([
84
+ ])
85
+
86
+ _dict = self.model_dump(
87
+ by_alias=True,
88
+ exclude=excluded_fields,
89
+ exclude_none=True,
90
+ )
91
+ # override the default output from pydantic by calling `to_dict()` of each item in feature_flags (list)
92
+ _items = []
93
+ if self.feature_flags:
94
+ for _item_feature_flags in self.feature_flags:
95
+ if _item_feature_flags:
96
+ _items.append(_item_feature_flags.to_dict())
97
+ _dict['featureFlags'] = _items
98
+ # override the default output from pydantic by calling `to_dict()` of blueprint
99
+ if self.blueprint:
100
+ _dict['blueprint'] = self.blueprint.to_dict()
101
+ # override the default output from pydantic by calling `to_dict()` of referee
102
+ if self.referee:
103
+ _dict['referee'] = self.referee.to_dict()
104
+ # set to None if dataset_id (nullable) is None
105
+ # and model_fields_set contains the field
106
+ if self.dataset_id is None and "dataset_id" in self.model_fields_set:
107
+ _dict['datasetId'] = None
108
+
109
+ # set to None if owner_mail (nullable) is None
110
+ # and model_fields_set contains the field
111
+ if self.owner_mail is None and "owner_mail" in self.model_fields_set:
112
+ _dict['ownerMail'] = None
113
+
114
+ return _dict
115
+
116
+ @classmethod
117
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
118
+ """Create an instance of SimpleWorkflowModel1 from a dict"""
119
+ if obj is None:
120
+ return None
121
+
122
+ if not isinstance(obj, dict):
123
+ return cls.model_validate(obj)
124
+
125
+ _obj = cls.model_validate({
126
+ "_t": obj.get("_t") if obj.get("_t") is not None else 'SimpleWorkflowModel',
127
+ "id": obj.get("id"),
128
+ "datasetId": obj.get("datasetId"),
129
+ "targetCountryCodes": obj.get("targetCountryCodes"),
130
+ "featureFlags": [FeatureFlag.from_dict(_item) for _item in obj["featureFlags"]] if obj.get("featureFlags") is not None else None,
131
+ "state": obj.get("state"),
132
+ "priority": obj.get("priority"),
133
+ "blueprint": SimpleWorkflowConfigBlueprint.from_dict(obj["blueprint"]) if obj.get("blueprint") is not None else None,
134
+ "referee": CompareWorkflowConfigReferee.from_dict(obj["referee"]) if obj.get("referee") is not None else None,
135
+ "name": obj.get("name"),
136
+ "ownerMail": obj.get("ownerMail")
137
+ })
138
+ return _obj
139
+
140
+
@@ -0,0 +1,96 @@
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, field_validator
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class StaticSelection(BaseModel):
26
+ """
27
+ StaticSelection
28
+ """ # noqa: E501
29
+ t: StrictStr = Field(description="Discriminator value for StaticSelection", alias="_t")
30
+ rapid_ids: List[StrictStr] = Field(alias="rapidIds")
31
+ __properties: ClassVar[List[str]] = ["_t", "rapidIds"]
32
+
33
+ @field_validator('t')
34
+ def t_validate_enum(cls, value):
35
+ """Validates the enum"""
36
+ if value not in set(['StaticSelection']):
37
+ raise ValueError("must be one of enum values ('StaticSelection')")
38
+ return value
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> Optional[Self]:
58
+ """Create an instance of StaticSelection from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self) -> Dict[str, Any]:
62
+ """Return the dictionary representation of the model using alias.
63
+
64
+ This has the following differences from calling pydantic's
65
+ `self.model_dump(by_alias=True)`:
66
+
67
+ * `None` is only added to the output dict for nullable fields that
68
+ were set at model initialization. Other fields with value `None`
69
+ are ignored.
70
+ """
71
+ excluded_fields: Set[str] = set([
72
+ ])
73
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of StaticSelection from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "_t": obj.get("_t") if obj.get("_t") is not None else 'StaticSelection',
92
+ "rapidIds": obj.get("rapidIds")
93
+ })
94
+ return _obj
95
+
96
+
@@ -24,11 +24,11 @@ from typing_extensions import Self
24
24
 
25
25
  class UserScoreUserFilterModel(BaseModel):
26
26
  """
27
- The UserScoreFilter is used to restrict users to a specific user score.
27
+ UserScoreUserFilterModel
28
28
  """ # noqa: E501
29
29
  t: StrictStr = Field(description="Discriminator value for UserScoreFilter", alias="_t")
30
- lowerbound: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The lowerbound of the user score.")
31
- upperbound: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The upperbound of the user score.")
30
+ lowerbound: Optional[Union[StrictFloat, StrictInt]] = None
31
+ upperbound: Optional[Union[StrictFloat, StrictInt]] = None
32
32
  __properties: ClassVar[List[str]] = ["_t", "lowerbound", "upperbound"]
33
33
 
34
34
  @field_validator('t')
@@ -24,11 +24,11 @@ from typing_extensions import Self
24
24
 
25
25
  class ValidationSelection(BaseModel):
26
26
  """
27
- A validation selection is used to show the validation tasks to the user. note that it is not supported to supply both a validation set id and selection configs.
27
+ ValidationSelection
28
28
  """ # noqa: E501
29
29
  t: StrictStr = Field(description="Discriminator value for ValidationSelection", alias="_t")
30
- amount: StrictInt = Field(description="The amount of validation tasks that should be shown to the user.")
31
- validation_set_id: StrictStr = Field(description="The validation set id can be changed to point to a specific validation set. if not provided a sane default will be used.", alias="validationSetId")
30
+ amount: StrictInt
31
+ validation_set_id: StrictStr = Field(alias="validationSetId")
32
32
  __properties: ClassVar[List[str]] = ["_t", "amount", "validationSetId"]
33
33
 
34
34
  @field_validator('t')
@@ -0,0 +1,41 @@
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 json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class WorkflowState(str, Enum):
22
+ """
23
+ WorkflowState
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ CREATED = 'Created'
30
+ STARTED = 'Started'
31
+ LABELING = 'Labeling'
32
+ PAUSED = 'Paused'
33
+ DONE = 'Done'
34
+ FAILED = 'Failed'
35
+
36
+ @classmethod
37
+ def from_json(cls, json_str: str) -> Self:
38
+ """Create an instance of WorkflowState from a JSON string"""
39
+ return cls(json.loads(json_str))
40
+
41
+
@@ -225,7 +225,7 @@ class RESTClientObject:
225
225
  headers=headers,
226
226
  preload_content=False
227
227
  )
228
- elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool):
228
+ elif headers['Content-Type'].startswith('text/') and isinstance(body, bool):
229
229
  request_body = "true" if body else "false"
230
230
  r = self.pool_manager.request(
231
231
  method,
@@ -5,7 +5,7 @@ The `rapidata.api_client` package is automatically generated by the [OpenAPI Gen
5
5
 
6
6
  - API version: v1
7
7
  - Package version: 1.0.0
8
- - Generator version: 7.9.0-SNAPSHOT
8
+ - Generator version: 7.9.0
9
9
  - Build package: org.openapitools.codegen.languages.PythonClientCodegen
10
10
 
11
11
  ## Requirements.
@@ -18,9 +18,10 @@ This python library package is generated without supporting files like setup.py
18
18
 
19
19
  To be able to use it, you will need these dependencies in your own package that uses this library:
20
20
 
21
- * urllib3 >= 1.25.3
22
- * python-dateutil
23
- * pydantic
21
+ * urllib3 >= 1.25.3, < 3.0.0
22
+ * python-dateutil >= 2.8.2
23
+ * pydantic >= 2
24
+ * typing-extensions >= 4.7.1
24
25
 
25
26
  ## Getting Started
26
27
 
@@ -75,6 +76,7 @@ Class | Method | HTTP request | Description
75
76
  ------------ | ------------- | ------------- | -------------
76
77
  *CocoApi* | [**coco_submit_post**](rapidata/api_client/docs/CocoApi.md#coco_submit_post) | **POST** /Coco/Submit | Creates a new validation set based on a previously uploaded CoCo set.
77
78
  *CocoApi* | [**coco_upload_post**](rapidata/api_client/docs/CocoApi.md#coco_upload_post) | **POST** /Coco/Upload | Uploads a CoCo set to the system.
79
+ *CompareWorkflowApi* | [**compare_workflow_get_result_overview_get**](rapidata/api_client/docs/CompareWorkflowApi.md#compare_workflow_get_result_overview_get) | **GET** /CompareWorkflow/GetResultOverview | Get the result overview for a compare workflow.
78
80
  *DatapointApi* | [**datapoint_delete_delete**](rapidata/api_client/docs/DatapointApi.md#datapoint_delete_delete) | **DELETE** /Datapoint/Delete | Delete a datapoint.
79
81
  *DatapointApi* | [**datapoint_get_all_datapoints_by_dataset_id_get**](rapidata/api_client/docs/DatapointApi.md#datapoint_get_all_datapoints_by_dataset_id_get) | **GET** /Datapoint/GetAllDatapointsByDatasetId | Get all datapoints of a dataset.
80
82
  *DatapointApi* | [**datapoint_get_by_id_get**](rapidata/api_client/docs/DatapointApi.md#datapoint_get_by_id_get) | **GET** /Datapoint/GetById | Get a datapoint by its id.
@@ -103,7 +105,6 @@ Class | Method | HTTP request | Description
103
105
  *OrderApi* | [**order_approve_post**](rapidata/api_client/docs/OrderApi.md#order_approve_post) | **POST** /Order/Approve | Approves an order that has been submitted for manual approval.
104
106
  *OrderApi* | [**order_clone_order_post**](rapidata/api_client/docs/OrderApi.md#order_clone_order_post) | **POST** /Order/CloneOrder | Clones an existing order.
105
107
  *OrderApi* | [**order_create_complex_order_post**](rapidata/api_client/docs/OrderApi.md#order_create_complex_order_post) | **POST** /Order/CreateComplexOrder | Creates a new order with a custom pipeline.
106
- *OrderApi* | [**order_create_default_order_post**](rapidata/api_client/docs/OrderApi.md#order_create_default_order_post) | **POST** /Order/CreateDefaultOrder | Creates a new order with a default pipeline.
107
108
  *OrderApi* | [**order_create_post**](rapidata/api_client/docs/OrderApi.md#order_create_post) | **POST** /Order/Create | Used to create a new order.
108
109
  *OrderApi* | [**order_create_unsupported_order_post**](rapidata/api_client/docs/OrderApi.md#order_create_unsupported_order_post) | **POST** /Order/CreateUnsupportedOrder | Notifies the admins that a user wants to create an order with an unsupported label type or data type.
109
110
  *OrderApi* | [**order_delete_delete**](rapidata/api_client/docs/OrderApi.md#order_delete_delete) | **DELETE** /Order/Delete | Deletes an order.
@@ -112,8 +113,10 @@ Class | Method | HTTP request | Description
112
113
  *OrderApi* | [**order_get_order_results_get**](rapidata/api_client/docs/OrderApi.md#order_get_order_results_get) | **GET** /Order/GetOrderResults | Aggregates the results of an order.
113
114
  *OrderApi* | [**order_get_public_get**](rapidata/api_client/docs/OrderApi.md#order_get_public_get) | **GET** /Order/GetPublic | Retrieves orders that are public and can be cloned by any user.
114
115
  *OrderApi* | [**order_get_workflow_config_get**](rapidata/api_client/docs/OrderApi.md#order_get_workflow_config_get) | **GET** /Order/GetWorkflowConfig | Retrieves the workflow configuration for an order.
116
+ *OrderApi* | [**order_pause_post**](rapidata/api_client/docs/OrderApi.md#order_pause_post) | **POST** /Order/Pause | Pauses an order that is processing. Meaning all campaigns in the order will be paused.
115
117
  *OrderApi* | [**order_query_get**](rapidata/api_client/docs/OrderApi.md#order_query_get) | **GET** /Order/Query | Queries orders based on a filter, page, and sort criteria.
116
118
  *OrderApi* | [**order_result_get**](rapidata/api_client/docs/OrderApi.md#order_result_get) | **GET** /Order/Result | Aggregates the results of an order.
119
+ *OrderApi* | [**order_resume_post**](rapidata/api_client/docs/OrderApi.md#order_resume_post) | **POST** /Order/Resume | Resumes a paused order. Meaning all campaigns in the order will be resumed.
117
120
  *OrderApi* | [**order_retry_failed_post**](rapidata/api_client/docs/OrderApi.md#order_retry_failed_post) | **POST** /Order/RetryFailed | Retries a failed order.
118
121
  *OrderApi* | [**order_share_put**](rapidata/api_client/docs/OrderApi.md#order_share_put) | **PUT** /Order/Share | Updates whether an order is public or not.
119
122
  *OrderApi* | [**order_submit_post**](rapidata/api_client/docs/OrderApi.md#order_submit_post) | **POST** /Order/Submit | Submits an order for approval.
@@ -126,12 +129,22 @@ Class | Method | HTTP request | Description
126
129
  *RapidApi* | [**rapid_query_validation_rapids_get**](rapidata/api_client/docs/RapidApi.md#rapid_query_validation_rapids_get) | **GET** /Rapid/QueryValidationRapids | Queries the validation rapids for a specific validation set.
127
130
  *RapidApi* | [**rapid_skip_user_guess_post**](rapidata/api_client/docs/RapidApi.md#rapid_skip_user_guess_post) | **POST** /Rapid/SkipUserGuess | Skips a Rapid for the user.
128
131
  *RapidApi* | [**rapid_validate_current_rapid_bag_get**](rapidata/api_client/docs/RapidApi.md#rapid_validate_current_rapid_bag_get) | **GET** /Rapid/ValidateCurrentRapidBag | Validates that the rapids associated with the current user are active.
132
+ *SimpleWorkflowApi* | [**simple_workflow_get_result_overview_get**](rapidata/api_client/docs/SimpleWorkflowApi.md#simple_workflow_get_result_overview_get) | **GET** /SimpleWorkflow/GetResultOverview | Get the result overview for a simple workflow.
129
133
  *ValidationApi* | [**validation_add_validation_rapid_post**](rapidata/api_client/docs/ValidationApi.md#validation_add_validation_rapid_post) | **POST** /Validation/AddValidationRapid | Adds a new validation rapid to the specified validation set.
130
134
  *ValidationApi* | [**validation_create_validation_set_post**](rapidata/api_client/docs/ValidationApi.md#validation_create_validation_set_post) | **POST** /Validation/CreateValidationSet | Creates a new empty validation set.
131
135
  *ValidationApi* | [**validation_get_available_validation_sets_get**](rapidata/api_client/docs/ValidationApi.md#validation_get_available_validation_sets_get) | **GET** /Validation/GetAvailableValidationSets | Gets the available validation sets for the current user.
132
136
  *ValidationApi* | [**validation_import_compare_post**](rapidata/api_client/docs/ValidationApi.md#validation_import_compare_post) | **POST** /Validation/ImportCompare | Imports a compare validation set from a zip file.
133
137
  *ValidationApi* | [**validation_import_post**](rapidata/api_client/docs/ValidationApi.md#validation_import_post) | **POST** /Validation/Import | Imports a validation set from a zip file.
134
138
  *ValidationApi* | [**validation_query_validation_sets_get**](rapidata/api_client/docs/ValidationApi.md#validation_query_validation_sets_get) | **GET** /Validation/QueryValidationSets | Queries validation sets based on the provided filter, paging and sorting criteria.
139
+ *WorkflowApi* | [**workflow_create_independent_post**](rapidata/api_client/docs/WorkflowApi.md#workflow_create_independent_post) | **POST** /Workflow/CreateIndependent | Creates an independent workflow.
140
+ *WorkflowApi* | [**workflow_delete_delete**](rapidata/api_client/docs/WorkflowApi.md#workflow_delete_delete) | **DELETE** /Workflow/Delete | Deletes a workflow.
141
+ *WorkflowApi* | [**workflow_get_by_id_get**](rapidata/api_client/docs/WorkflowApi.md#workflow_get_by_id_get) | **GET** /Workflow/GetById | Get a workflow by its ID.
142
+ *WorkflowApi* | [**workflow_get_progress_get**](rapidata/api_client/docs/WorkflowApi.md#workflow_get_progress_get) | **GET** /Workflow/GetProgress | Get the progress of a workflow.
143
+ *WorkflowApi* | [**workflow_get_result_overview_get**](rapidata/api_client/docs/WorkflowApi.md#workflow_get_result_overview_get) | **GET** /Workflow/GetResultOverview | Get the result overview for a workflow.
144
+ *WorkflowApi* | [**workflow_pause_post**](rapidata/api_client/docs/WorkflowApi.md#workflow_pause_post) | **POST** /Workflow/Pause | Pauses a running workflow.
145
+ *WorkflowApi* | [**workflow_query_get**](rapidata/api_client/docs/WorkflowApi.md#workflow_query_get) | **GET** /Workflow/Query | Queries workflows based on the provided filter, page, and sort criteria.
146
+ *WorkflowApi* | [**workflow_resume_post**](rapidata/api_client/docs/WorkflowApi.md#workflow_resume_post) | **POST** /Workflow/Resume | Resumes a paused workflow.
147
+ *WorkflowApi* | [**workflow_start_independent_post**](rapidata/api_client/docs/WorkflowApi.md#workflow_start_independent_post) | **POST** /Workflow/StartIndependent | Starts an independent workflow.
135
148
 
136
149
 
137
150
  ## Documentation For Models
@@ -168,7 +181,10 @@ Class | Method | HTTP request | Description
168
181
  - [CompareWorkflowConfig](rapidata/api_client/docs/CompareWorkflowConfig.md)
169
182
  - [CompareWorkflowConfigRapidSelectionConfigsInner](rapidata/api_client/docs/CompareWorkflowConfigRapidSelectionConfigsInner.md)
170
183
  - [CompareWorkflowConfigReferee](rapidata/api_client/docs/CompareWorkflowConfigReferee.md)
184
+ - [CompareWorkflowGetResultOverviewGet200Response](rapidata/api_client/docs/CompareWorkflowGetResultOverviewGet200Response.md)
171
185
  - [CompareWorkflowModel](rapidata/api_client/docs/CompareWorkflowModel.md)
186
+ - [CompareWorkflowModel1](rapidata/api_client/docs/CompareWorkflowModel1.md)
187
+ - [CompletedRapidModel](rapidata/api_client/docs/CompletedRapidModel.md)
172
188
  - [ConditionalValidationRapidSelectionConfig](rapidata/api_client/docs/ConditionalValidationRapidSelectionConfig.md)
173
189
  - [Coordinate](rapidata/api_client/docs/Coordinate.md)
174
190
  - [CorrelatedRapidSelectionConfig](rapidata/api_client/docs/CorrelatedRapidSelectionConfig.md)
@@ -181,11 +197,11 @@ Class | Method | HTTP request | Description
181
197
  - [CreateComplexOrderResult](rapidata/api_client/docs/CreateComplexOrderResult.md)
182
198
  - [CreateDatasetArtifactModel](rapidata/api_client/docs/CreateDatasetArtifactModel.md)
183
199
  - [CreateDatasetArtifactModelDataset](rapidata/api_client/docs/CreateDatasetArtifactModelDataset.md)
184
- - [CreateDefaultOrderModel](rapidata/api_client/docs/CreateDefaultOrderModel.md)
185
- - [CreateDefaultOrderModelWorkflowConfig](rapidata/api_client/docs/CreateDefaultOrderModelWorkflowConfig.md)
186
200
  - [CreateDemographicRapidModel](rapidata/api_client/docs/CreateDemographicRapidModel.md)
187
201
  - [CreateEmptyValidationSetResult](rapidata/api_client/docs/CreateEmptyValidationSetResult.md)
188
- - [CreateLegacyOrderResult](rapidata/api_client/docs/CreateLegacyOrderResult.md)
202
+ - [CreateIndependentWorkflowModel](rapidata/api_client/docs/CreateIndependentWorkflowModel.md)
203
+ - [CreateIndependentWorkflowModelWorkflowConfig](rapidata/api_client/docs/CreateIndependentWorkflowModelWorkflowConfig.md)
204
+ - [CreateIndependentWorkflowResult](rapidata/api_client/docs/CreateIndependentWorkflowResult.md)
189
205
  - [CreateOrderModel](rapidata/api_client/docs/CreateOrderModel.md)
190
206
  - [CreateOrderModelReferee](rapidata/api_client/docs/CreateOrderModelReferee.md)
191
207
  - [CreateOrderModelSelectionsInner](rapidata/api_client/docs/CreateOrderModelSelectionsInner.md)
@@ -224,17 +240,27 @@ Class | Method | HTTP request | Description
224
240
  - [FreeTextResult](rapidata/api_client/docs/FreeTextResult.md)
225
241
  - [Gender](rapidata/api_client/docs/Gender.md)
226
242
  - [GenderUserFilterModel](rapidata/api_client/docs/GenderUserFilterModel.md)
243
+ - [GetAttachCategoryWorkflowResultOverviewResult](rapidata/api_client/docs/GetAttachCategoryWorkflowResultOverviewResult.md)
227
244
  - [GetAvailableValidationSetsResult](rapidata/api_client/docs/GetAvailableValidationSetsResult.md)
245
+ - [GetCompareWorkflowResultOverviewResult](rapidata/api_client/docs/GetCompareWorkflowResultOverviewResult.md)
246
+ - [GetCompareWorkflowResultOverviewSmallResult](rapidata/api_client/docs/GetCompareWorkflowResultOverviewSmallResult.md)
228
247
  - [GetDatapointsByDatasetIdResult](rapidata/api_client/docs/GetDatapointsByDatasetIdResult.md)
229
248
  - [GetDatasetByIdResult](rapidata/api_client/docs/GetDatasetByIdResult.md)
230
249
  - [GetOrderByIdResult](rapidata/api_client/docs/GetOrderByIdResult.md)
231
250
  - [GetOrderResultsResult](rapidata/api_client/docs/GetOrderResultsResult.md)
232
251
  - [GetPublicOrdersResult](rapidata/api_client/docs/GetPublicOrdersResult.md)
252
+ - [GetSimpleWorkflowResultOverviewResult](rapidata/api_client/docs/GetSimpleWorkflowResultOverviewResult.md)
253
+ - [GetWorkflowByIdResult](rapidata/api_client/docs/GetWorkflowByIdResult.md)
254
+ - [GetWorkflowByIdResultWorkflow](rapidata/api_client/docs/GetWorkflowByIdResultWorkflow.md)
233
255
  - [GetWorkflowConfigResult](rapidata/api_client/docs/GetWorkflowConfigResult.md)
234
256
  - [GetWorkflowConfigResultWorkflowConfig](rapidata/api_client/docs/GetWorkflowConfigResultWorkflowConfig.md)
257
+ - [GetWorkflowProgressResult](rapidata/api_client/docs/GetWorkflowProgressResult.md)
258
+ - [GetWorkflowResultOverviewResult](rapidata/api_client/docs/GetWorkflowResultOverviewResult.md)
259
+ - [IWorkflowModelPagedResult](rapidata/api_client/docs/IWorkflowModelPagedResult.md)
235
260
  - [ImageDimensionMetadata](rapidata/api_client/docs/ImageDimensionMetadata.md)
236
261
  - [ImportFromFileResult](rapidata/api_client/docs/ImportFromFileResult.md)
237
262
  - [ImportValidationSetFromFileResult](rapidata/api_client/docs/ImportValidationSetFromFileResult.md)
263
+ - [InProgressRapidModel](rapidata/api_client/docs/InProgressRapidModel.md)
238
264
  - [IssueAuthTokenResult](rapidata/api_client/docs/IssueAuthTokenResult.md)
239
265
  - [IssueClientAuthTokenResult](rapidata/api_client/docs/IssueClientAuthTokenResult.md)
240
266
  - [LabelingSelection](rapidata/api_client/docs/LabelingSelection.md)
@@ -267,11 +293,13 @@ Class | Method | HTTP request | Description
267
293
  - [NeverEndingRefereeConfig](rapidata/api_client/docs/NeverEndingRefereeConfig.md)
268
294
  - [NewsletterModel](rapidata/api_client/docs/NewsletterModel.md)
269
295
  - [NoValidationWorkflowRapidSelectionConfig](rapidata/api_client/docs/NoValidationWorkflowRapidSelectionConfig.md)
296
+ - [NotStartedRapidModel](rapidata/api_client/docs/NotStartedRapidModel.md)
270
297
  - [NullAsset](rapidata/api_client/docs/NullAsset.md)
271
298
  - [NullAssetModel](rapidata/api_client/docs/NullAssetModel.md)
272
299
  - [OnlyValidationWorkflowRapidSelectionConfig](rapidata/api_client/docs/OnlyValidationWorkflowRapidSelectionConfig.md)
273
300
  - [OrderModel](rapidata/api_client/docs/OrderModel.md)
274
301
  - [OrderQueryGet200Response](rapidata/api_client/docs/OrderQueryGet200Response.md)
302
+ - [OrderState](rapidata/api_client/docs/OrderState.md)
275
303
  - [OriginalFilenameMetadata](rapidata/api_client/docs/OriginalFilenameMetadata.md)
276
304
  - [PageInfo](rapidata/api_client/docs/PageInfo.md)
277
305
  - [PolygonPayload](rapidata/api_client/docs/PolygonPayload.md)
@@ -289,6 +317,10 @@ Class | Method | HTTP request | Description
289
317
  - [QueryValidationRapidsResultAsset](rapidata/api_client/docs/QueryValidationRapidsResultAsset.md)
290
318
  - [QueryValidationRapidsResultPagedResult](rapidata/api_client/docs/QueryValidationRapidsResultPagedResult.md)
291
319
  - [QueryValidationSetModel](rapidata/api_client/docs/QueryValidationSetModel.md)
320
+ - [QueryWorkflowsModel](rapidata/api_client/docs/QueryWorkflowsModel.md)
321
+ - [RankedDatapointModel](rapidata/api_client/docs/RankedDatapointModel.md)
322
+ - [RapidAnswer](rapidata/api_client/docs/RapidAnswer.md)
323
+ - [RapidAnswerResult](rapidata/api_client/docs/RapidAnswerResult.md)
292
324
  - [RapidResultModel](rapidata/api_client/docs/RapidResultModel.md)
293
325
  - [RapidResultModelResult](rapidata/api_client/docs/RapidResultModelResult.md)
294
326
  - [RapidSkippedModel](rapidata/api_client/docs/RapidSkippedModel.md)
@@ -300,12 +332,15 @@ Class | Method | HTTP request | Description
300
332
  - [SignupShadowCustomerModel](rapidata/api_client/docs/SignupShadowCustomerModel.md)
301
333
  - [SimpleWorkflowConfig](rapidata/api_client/docs/SimpleWorkflowConfig.md)
302
334
  - [SimpleWorkflowConfigBlueprint](rapidata/api_client/docs/SimpleWorkflowConfigBlueprint.md)
335
+ - [SimpleWorkflowGetResultOverviewGet200Response](rapidata/api_client/docs/SimpleWorkflowGetResultOverviewGet200Response.md)
303
336
  - [SimpleWorkflowModel](rapidata/api_client/docs/SimpleWorkflowModel.md)
337
+ - [SimpleWorkflowModel1](rapidata/api_client/docs/SimpleWorkflowModel1.md)
304
338
  - [SimpleWorkflowModelBlueprint](rapidata/api_client/docs/SimpleWorkflowModelBlueprint.md)
305
339
  - [SkipResult](rapidata/api_client/docs/SkipResult.md)
306
340
  - [SortCriterion](rapidata/api_client/docs/SortCriterion.md)
307
341
  - [SortDirection](rapidata/api_client/docs/SortDirection.md)
308
342
  - [StaticRapidSelectionConfig](rapidata/api_client/docs/StaticRapidSelectionConfig.md)
343
+ - [StaticSelection](rapidata/api_client/docs/StaticSelection.md)
309
344
  - [SubmitCocoModel](rapidata/api_client/docs/SubmitCocoModel.md)
310
345
  - [SubmitCocoResult](rapidata/api_client/docs/SubmitCocoResult.md)
311
346
  - [SubmitPasswordResetCommand](rapidata/api_client/docs/SubmitPasswordResetCommand.md)
@@ -340,6 +375,7 @@ Class | Method | HTTP request | Description
340
375
  - [WorkflowLabelingStepModel](rapidata/api_client/docs/WorkflowLabelingStepModel.md)
341
376
  - [WorkflowSplitModel](rapidata/api_client/docs/WorkflowSplitModel.md)
342
377
  - [WorkflowSplitModelFilterConfigsInner](rapidata/api_client/docs/WorkflowSplitModelFilterConfigsInner.md)
378
+ - [WorkflowState](rapidata/api_client/docs/WorkflowState.md)
343
379
 
344
380
 
345
381
  <a id="documentation-for-authorization"></a>
@@ -1 +1,7 @@
1
- from .rapidata_client import RapidataClient
1
+ from .rapidata_client import RapidataClient
2
+ from .workflow import ClassifyWorkflow, TranscriptionWorkflow, CompareWorkflow, FreeTextWorkflow
3
+ from .selection import DemographicSelection, LabelingSelection, ValidationSelection
4
+ from .referee import NaiveReferee, ClassifyEarlyStoppingReferee
5
+ from .metadata import PrivateTextMetadata, PublicTextMetadata, PromptMetadata, TranscriptionMetadata
6
+ from .feature_flags import FeatureFlags
7
+ from .country_codes import CountryCodes
@@ -1 +1 @@
1
- from .country_codes import CountryCodes as CountryCodes
1
+ from .country_codes import CountryCodes