rapidata 2.42.2__py3-none-any.whl → 2.42.4__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 (40) hide show
  1. rapidata/__init__.py +1 -2
  2. rapidata/rapidata_client/__init__.py +0 -1
  3. rapidata/rapidata_client/datapoints/metadata/_media_asset_metadata.py +4 -6
  4. rapidata/rapidata_client/datapoints/metadata/_private_text_metadata.py +5 -6
  5. rapidata/rapidata_client/datapoints/metadata/_prompt_identifier_metadata.py +4 -5
  6. rapidata/rapidata_client/datapoints/metadata/_prompt_metadata.py +4 -9
  7. rapidata/rapidata_client/datapoints/metadata/_public_text_metadata.py +5 -6
  8. rapidata/rapidata_client/datapoints/metadata/_select_words_metadata.py +3 -4
  9. rapidata/rapidata_client/demographic/demographic_manager.py +0 -1
  10. rapidata/rapidata_client/filter/_base_filter.py +9 -15
  11. rapidata/rapidata_client/filter/age_filter.py +5 -11
  12. rapidata/rapidata_client/filter/and_filter.py +4 -11
  13. rapidata/rapidata_client/filter/campaign_filter.py +3 -10
  14. rapidata/rapidata_client/filter/country_filter.py +20 -17
  15. rapidata/rapidata_client/filter/custom_filter.py +4 -11
  16. rapidata/rapidata_client/filter/gender_filter.py +5 -10
  17. rapidata/rapidata_client/filter/language_filter.py +24 -22
  18. rapidata/rapidata_client/filter/not_filter.py +4 -11
  19. rapidata/rapidata_client/filter/or_filter.py +4 -12
  20. rapidata/rapidata_client/filter/response_count_filter.py +6 -13
  21. rapidata/rapidata_client/filter/user_score_filter.py +19 -24
  22. rapidata/rapidata_client/order/_rapidata_order_builder.py +11 -12
  23. rapidata/rapidata_client/order/rapidata_order_manager.py +13 -13
  24. rapidata/rapidata_client/workflow/_base_workflow.py +4 -0
  25. rapidata/rapidata_client/workflow/_classify_workflow.py +3 -0
  26. rapidata/rapidata_client/workflow/_compare_workflow.py +3 -0
  27. rapidata/rapidata_client/workflow/_draw_workflow.py +3 -0
  28. rapidata/rapidata_client/workflow/_evaluation_workflow.py +3 -0
  29. rapidata/rapidata_client/workflow/_free_text_workflow.py +3 -0
  30. rapidata/rapidata_client/workflow/_locate_workflow.py +3 -0
  31. rapidata/rapidata_client/workflow/_ranking_workflow.py +7 -2
  32. rapidata/rapidata_client/workflow/_select_words_workflow.py +3 -0
  33. rapidata/rapidata_client/workflow/_timestamp_workflow.py +3 -0
  34. rapidata/types/__init__.py +0 -1
  35. {rapidata-2.42.2.dist-info → rapidata-2.42.4.dist-info}/METADATA +1 -1
  36. {rapidata-2.42.2.dist-info → rapidata-2.42.4.dist-info}/RECORD +38 -40
  37. rapidata/rapidata_client/country_codes/__init__.py +0 -1
  38. rapidata/rapidata_client/country_codes/country_codes.py +0 -19
  39. {rapidata-2.42.2.dist-info → rapidata-2.42.4.dist-info}/WHEEL +0 -0
  40. {rapidata-2.42.2.dist-info → rapidata-2.42.4.dist-info}/licenses/LICENSE +0 -0
rapidata/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "2.42.2"
1
+ __version__ = "2.42.4"
2
2
 
3
3
  from .rapidata_client import (
4
4
  RapidataClient,
@@ -31,7 +31,6 @@ from .rapidata_client import (
31
31
  AgeGroup,
32
32
  GenderFilter,
33
33
  Gender,
34
- CountryCodes,
35
34
  Box,
36
35
  Datapoint,
37
36
  PromptMetadata,
@@ -28,7 +28,6 @@ from .settings import (
28
28
  AllowNeitherBoth,
29
29
  SwapContextInstruction,
30
30
  )
31
- from .country_codes import CountryCodes
32
31
  from .filter import (
33
32
  CountryFilter,
34
33
  LanguageFilter,
@@ -6,13 +6,11 @@ from rapidata.api_client.models.multi_asset_input_assets_inner import (
6
6
  ExistingAssetInput,
7
7
  MultiAssetInputAssetsInner,
8
8
  )
9
+ from pydantic import BaseModel
9
10
 
10
11
 
11
- class MediaAssetMetadata(Metadata):
12
-
13
- def __init__(self, internal_file_name: str):
14
- super().__init__()
15
- self._internal_file_name = internal_file_name
12
+ class MediaAssetMetadata(Metadata, BaseModel):
13
+ internal_file_name: str
16
14
 
17
15
  def to_model(self):
18
16
  return PromptAssetMetadataInput(
@@ -20,7 +18,7 @@ class MediaAssetMetadata(Metadata):
20
18
  asset=MultiAssetInputAssetsInner(
21
19
  actual_instance=ExistingAssetInput(
22
20
  _t="ExistingAssetInput",
23
- name=self._internal_file_name,
21
+ name=self.internal_file_name,
24
22
  ),
25
23
  ),
26
24
  )
@@ -2,16 +2,15 @@ from rapidata.api_client.models.private_text_metadata_input import (
2
2
  PrivateTextMetadataInput,
3
3
  )
4
4
  from rapidata.rapidata_client.datapoints.metadata._base_metadata import Metadata
5
+ from pydantic import BaseModel
5
6
 
6
7
 
7
- class PrivateTextMetadata(Metadata):
8
+ class PrivateTextMetadata(Metadata, BaseModel):
8
9
 
9
- def __init__(self, text: str, identifier: str = "private_text"):
10
- super().__init__()
11
- self._identifier = identifier
12
- self._text = text
10
+ text: str
11
+ identifier: str = "private_text"
13
12
 
14
13
  def to_model(self):
15
14
  return PrivateTextMetadataInput(
16
- _t="PrivateTextMetadataInput", identifier=self._identifier, text=self._text
15
+ _t="PrivateTextMetadataInput", identifier=self.identifier, text=self.text
17
16
  )
@@ -2,14 +2,13 @@ from rapidata.rapidata_client.datapoints.metadata._base_metadata import Metadata
2
2
  from rapidata.api_client.models.private_text_metadata_input import (
3
3
  PrivateTextMetadataInput,
4
4
  )
5
+ from pydantic import BaseModel
5
6
 
6
7
 
7
- class PromptIdentifierMetadata(Metadata):
8
- def __init__(self, identifier: str):
9
- super().__init__()
10
- self._identifier = identifier
8
+ class PromptIdentifierMetadata(Metadata, BaseModel):
9
+ identifier: str
11
10
 
12
11
  def to_model(self):
13
12
  return PrivateTextMetadataInput(
14
- _t="PrivateTextMetadataInput", identifier="prompt-id", text=self._identifier
13
+ _t="PrivateTextMetadataInput", identifier="prompt-id", text=self.identifier
15
14
  )
@@ -1,17 +1,12 @@
1
1
  from rapidata.rapidata_client.datapoints.metadata._base_metadata import Metadata
2
2
  from rapidata.api_client.models.prompt_metadata_input import PromptMetadataInput
3
+ from pydantic import BaseModel
3
4
 
4
5
 
5
- class PromptMetadata(Metadata):
6
+ class PromptMetadata(Metadata, BaseModel):
6
7
  """The PromptMetadata class is used to display a prompt to the user."""
7
8
 
8
- def __init__(self, prompt: str):
9
- super().__init__()
10
-
11
- if not isinstance(prompt, str):
12
- raise ValueError("Prompt must be a string")
13
-
14
- self._prompt = prompt
9
+ prompt: str
15
10
 
16
11
  def to_model(self):
17
- return PromptMetadataInput(_t="PromptMetadataInput", prompt=self._prompt)
12
+ return PromptMetadataInput(_t="PromptMetadataInput", prompt=self.prompt)
@@ -2,16 +2,15 @@ from rapidata.api_client.models.public_text_metadata_input import (
2
2
  PublicTextMetadataInput,
3
3
  )
4
4
  from rapidata.rapidata_client.datapoints.metadata._base_metadata import Metadata
5
+ from pydantic import BaseModel
5
6
 
6
7
 
7
- class PublicTextMetadata(Metadata):
8
+ class PublicTextMetadata(Metadata, BaseModel):
8
9
 
9
- def __init__(self, text: str, identifier: str = "public_text"):
10
- super().__init__()
11
- self._identifier = identifier
12
- self._text = text
10
+ text: str
11
+ identifier: str = "public_text"
13
12
 
14
13
  def to_model(self):
15
14
  return PublicTextMetadataInput(
16
- _t="PublicTextMetadataInput", identifier=self._identifier, text=self._text
15
+ _t="PublicTextMetadataInput", identifier=self.identifier, text=self.text
17
16
  )
@@ -2,14 +2,13 @@ from rapidata.api_client.models.transcription_metadata_input import (
2
2
  TranscriptionMetadataInput,
3
3
  )
4
4
  from rapidata.rapidata_client.datapoints.metadata._base_metadata import Metadata
5
+ from pydantic import BaseModel
5
6
 
6
7
 
7
- class SelectWordsMetadata(Metadata):
8
+ class SelectWordsMetadata(Metadata, BaseModel):
8
9
  """SelectWordsMetadata Class is used to define the Sentence that will be display to the user."""
9
10
 
10
- def __init__(self, select_words: str):
11
- super().__init__()
12
- self.select_words = select_words
11
+ select_words: str
13
12
 
14
13
  def to_model(self):
15
14
  return TranscriptionMetadataInput(
@@ -1,4 +1,3 @@
1
- from argparse import Action
2
1
  from rapidata.api_client import ExistingAssetInput
3
2
  from rapidata.api_client.models.create_demographic_rapid_model_asset import (
4
3
  CreateDemographicRapidModelAsset,
@@ -19,15 +19,15 @@ class RapidataFilter:
19
19
  # If self is already an OrFilter, extend its filters list
20
20
  if isinstance(self, OrFilter):
21
21
  if isinstance(other, OrFilter):
22
- return OrFilter(self.filters + other.filters)
22
+ return OrFilter(filters=self.filters + other.filters)
23
23
  else:
24
- return OrFilter(self.filters + [other])
24
+ return OrFilter(filters=self.filters + [other])
25
25
  # If other is an OrFilter, prepend self to its filters
26
26
  elif isinstance(other, OrFilter):
27
- return OrFilter([self] + other.filters)
27
+ return OrFilter(filters=[self] + other.filters)
28
28
  # Neither is an OrFilter, create a new one
29
29
  else:
30
- return OrFilter([self, other])
30
+ return OrFilter(filters=[self, other])
31
31
 
32
32
  def __and__(self, other):
33
33
  """Enable the & operator to create AndFilter combinations."""
@@ -39,15 +39,15 @@ class RapidataFilter:
39
39
  # If self is already an AndFilter, extend its filters list
40
40
  if isinstance(self, AndFilter):
41
41
  if isinstance(other, AndFilter):
42
- return AndFilter(self.filters + other.filters)
42
+ return AndFilter(filters=self.filters + other.filters)
43
43
  else:
44
- return AndFilter(self.filters + [other])
44
+ return AndFilter(filters=self.filters + [other])
45
45
  # If other is an AndFilter, prepend self to its filters
46
46
  elif isinstance(other, AndFilter):
47
- return AndFilter([self] + other.filters)
47
+ return AndFilter(filters=[self] + other.filters)
48
48
  # Neither is an AndFilter, create a new one
49
49
  else:
50
- return AndFilter([self, other])
50
+ return AndFilter(filters=[self, other])
51
51
 
52
52
  def __invert__(self):
53
53
  """Enable the ~ operator to create NotFilter negations."""
@@ -58,10 +58,4 @@ class RapidataFilter:
58
58
  return self.filter
59
59
  # Create a new NotFilter
60
60
  else:
61
- return NotFilter(self)
62
-
63
- def __str__(self) -> str:
64
- return f"{self.__class__.__name__}()"
65
-
66
- def __repr__(self) -> str:
67
- return f"{self.__class__.__name__}()"
61
+ return NotFilter(filter=self)
@@ -1,29 +1,23 @@
1
- from typing import Any
2
1
  from rapidata.rapidata_client.filter._base_filter import RapidataFilter
3
2
  from rapidata.api_client.models.age_user_filter_model import AgeUserFilterModel
4
3
  from rapidata.rapidata_client.filter.models.age_group import AgeGroup
4
+ from pydantic import BaseModel, ConfigDict
5
5
 
6
6
 
7
- class AgeFilter(RapidataFilter):
7
+ class AgeFilter(RapidataFilter, BaseModel):
8
8
  """AgeFilter Class
9
9
 
10
10
  Can be used to filter who to target based on age groups.
11
11
 
12
-
13
12
  Args:
14
13
  age_groups (list[AgeGroup]): List of age groups to filter by."""
15
14
 
16
- def __init__(self, age_groups: list[AgeGroup]):
17
- self.age_groups = age_groups
15
+ model_config = ConfigDict(arbitrary_types_allowed=True)
16
+
17
+ age_groups: list[AgeGroup]
18
18
 
19
19
  def _to_model(self):
20
20
  return AgeUserFilterModel(
21
21
  _t="AgeFilter",
22
22
  ageGroups=[age_group._to_backend_model() for age_group in self.age_groups],
23
23
  )
24
-
25
- def __str__(self) -> str:
26
- return f"AgeFilter(age_groups={self.age_groups})"
27
-
28
- def __repr__(self) -> str:
29
- return f"AgeFilter(age_groups={self.age_groups!r})"
@@ -4,9 +4,10 @@ from rapidata.api_client.models.and_user_filter_model import AndUserFilterModel
4
4
  from rapidata.api_client.models.and_user_filter_model_filters_inner import (
5
5
  AndUserFilterModelFiltersInner,
6
6
  )
7
+ from pydantic import BaseModel, ConfigDict
7
8
 
8
9
 
9
- class AndFilter(RapidataFilter):
10
+ class AndFilter(RapidataFilter, BaseModel):
10
11
  """A filter that combines multiple filters with a logical AND operation.
11
12
  This class implements a logical AND operation on a list of filters, where the condition is met if all of the filters' conditions are met.
12
13
 
@@ -23,11 +24,9 @@ class AndFilter(RapidataFilter):
23
24
  This will match users who have their phone set to English AND are located in the United States.
24
25
  """
25
26
 
26
- def __init__(self, filters: list[RapidataFilter]):
27
- if not all(isinstance(filter, RapidataFilter) for filter in filters):
28
- raise ValueError("Filters must be a RapidataFilter object")
27
+ model_config = ConfigDict(arbitrary_types_allowed=True)
29
28
 
30
- self.filters = filters
29
+ filters: list[RapidataFilter]
31
30
 
32
31
  def _to_model(self):
33
32
  return AndUserFilterModel(
@@ -37,9 +36,3 @@ class AndFilter(RapidataFilter):
37
36
  for filter in self.filters
38
37
  ],
39
38
  )
40
-
41
- def __str__(self) -> str:
42
- return f"AndFilter(filters={self.filters})"
43
-
44
- def __repr__(self) -> str:
45
- return f"AndFilter(filters={self.filters!r})"
@@ -1,11 +1,11 @@
1
- from typing import Any
2
1
  from rapidata.rapidata_client.filter._base_filter import RapidataFilter
3
2
  from rapidata.api_client.models.campaign_user_filter_model import (
4
3
  CampaignUserFilterModel,
5
4
  )
5
+ from pydantic import BaseModel
6
6
 
7
7
 
8
- class CampaignFilter(RapidataFilter):
8
+ class CampaignFilter(RapidataFilter, BaseModel):
9
9
  """CampaignFilter Class
10
10
 
11
11
  Can be used to filter who to target based on campaign IDs.
@@ -16,17 +16,10 @@ class CampaignFilter(RapidataFilter):
16
16
  campaign_ids (list[str]): List of campaign IDs to filter by.
17
17
  """
18
18
 
19
- def __init__(self, campaign_ids: list[str]):
20
- self.campaign_ids = campaign_ids
19
+ campaign_ids: list[str]
21
20
 
22
21
  def _to_model(self):
23
22
  return CampaignUserFilterModel(
24
23
  _t="CampaignFilter",
25
24
  campaignIds=self.campaign_ids,
26
25
  )
27
-
28
- def __str__(self) -> str:
29
- return f"CampaignFilter(campaign_ids={self.campaign_ids})"
30
-
31
- def __repr__(self) -> str:
32
- return f"CampaignFilter(campaign_ids={self.campaign_ids!r})"
@@ -1,9 +1,10 @@
1
- from typing import Any
2
1
  from rapidata.rapidata_client.filter._base_filter import RapidataFilter
3
2
  from rapidata.api_client.models.country_user_filter_model import CountryUserFilterModel
3
+ from pydantic import BaseModel, field_validator
4
+ from rapidata.rapidata_client.config import logger
4
5
 
5
6
 
6
- class CountryFilter(RapidataFilter):
7
+ class CountryFilter(RapidataFilter, BaseModel):
7
8
  """CountryFilter Class
8
9
 
9
10
  Can be used to filter who to target based on country codes.
@@ -12,21 +13,23 @@ class CountryFilter(RapidataFilter):
12
13
  country_codes (list[str]): List of country codes (capitalized) to filter by.
13
14
  """
14
15
 
15
- def __init__(self, country_codes: list[str]):
16
- # check that all characters in the country codes are uppercase
17
- if not isinstance(country_codes, list):
18
- raise ValueError("Country codes must be a list")
19
-
20
- if not all([code.isupper() for code in country_codes]):
21
- raise ValueError("Country codes must be uppercase")
22
-
23
- self.country_codes = country_codes
16
+ country_codes: list[str]
17
+
18
+ @field_validator("country_codes")
19
+ @classmethod
20
+ def validate_country_codes(cls, codes: list[str]) -> list[str]:
21
+ validated = []
22
+ for code in codes:
23
+ if len(code) != 2:
24
+ raise ValueError(
25
+ f"Country codes must be length 2. Invalid code: '{code}'"
26
+ )
27
+ if code != code.upper():
28
+ logger.warning(
29
+ f"Country code '{code}' should be uppercase. It will be uppercased automatically."
30
+ )
31
+ validated.append(code.upper())
32
+ return validated
24
33
 
25
34
  def _to_model(self):
26
35
  return CountryUserFilterModel(_t="CountryFilter", countries=self.country_codes)
27
-
28
- def __str__(self) -> str:
29
- return f"CountryFilter(country_codes={self.country_codes})"
30
-
31
- def __repr__(self) -> str:
32
- return f"CountryFilter(country_codes={self.country_codes!r})"
@@ -1,9 +1,9 @@
1
- from typing import Any
2
1
  from rapidata.rapidata_client.filter._base_filter import RapidataFilter
3
2
  from rapidata.api_client.models.custom_user_filter_model import CustomUserFilterModel
3
+ from pydantic import BaseModel
4
4
 
5
5
 
6
- class CustomFilter(RapidataFilter):
6
+ class CustomFilter(RapidataFilter, BaseModel):
7
7
  """CustomFilter Class
8
8
 
9
9
  Can be used to filter who to target based on custom filters.
@@ -17,9 +17,8 @@ class CustomFilter(RapidataFilter):
17
17
  values (list[str]): List of values to filter by.
18
18
  """
19
19
 
20
- def __init__(self, identifier: str, values: list[str]):
21
- self.identifier = identifier
22
- self.values = values
20
+ identifier: str
21
+ values: list[str]
23
22
 
24
23
  def _to_model(self):
25
24
  return CustomUserFilterModel(
@@ -27,9 +26,3 @@ class CustomFilter(RapidataFilter):
27
26
  identifier=self.identifier,
28
27
  values=self.values,
29
28
  )
30
-
31
- def __str__(self) -> str:
32
- return f"CustomFilter(identifier={self.identifier}, values={self.values})"
33
-
34
- def __repr__(self) -> str:
35
- return f"CustomFilter(identifier={self.identifier!r}, values={self.values!r})"
@@ -1,10 +1,10 @@
1
- from typing import Any
2
1
  from rapidata.rapidata_client.filter._base_filter import RapidataFilter
3
2
  from rapidata.api_client.models.gender_user_filter_model import GenderUserFilterModel
4
3
  from rapidata.rapidata_client.filter.models.gender import Gender
4
+ from pydantic import BaseModel, ConfigDict
5
5
 
6
6
 
7
- class GenderFilter(RapidataFilter):
7
+ class GenderFilter(RapidataFilter, BaseModel):
8
8
  """GenderFilter Class
9
9
 
10
10
  Can be used to filter who to target based on their gender.
@@ -13,17 +13,12 @@ class GenderFilter(RapidataFilter):
13
13
  Args:
14
14
  genders (list[Gender]): List of genders to filter by."""
15
15
 
16
- def __init__(self, genders: list[Gender]):
17
- self.genders = genders
16
+ model_config = ConfigDict(arbitrary_types_allowed=True)
17
+
18
+ genders: list[Gender]
18
19
 
19
20
  def _to_model(self):
20
21
  return GenderUserFilterModel(
21
22
  _t="GenderFilter",
22
23
  genders=[gender._to_backend_model() for gender in self.genders],
23
24
  )
24
-
25
- def __str__(self) -> str:
26
- return f"GenderFilter(genders={self.genders})"
27
-
28
- def __repr__(self) -> str:
29
- return f"GenderFilter(genders={self.genders!r})"
@@ -1,11 +1,12 @@
1
- from typing import Any
2
1
  from rapidata.rapidata_client.filter._base_filter import RapidataFilter
3
2
  from rapidata.api_client.models.language_user_filter_model import (
4
3
  LanguageUserFilterModel,
5
4
  )
5
+ from pydantic import BaseModel, field_validator
6
+ from rapidata.rapidata_client.config import logger
6
7
 
7
8
 
8
- class LanguageFilter(RapidataFilter):
9
+ class LanguageFilter(RapidataFilter, BaseModel):
9
10
  """LanguageFilter Class
10
11
 
11
12
  Can be used to filter who to target based on language codes.
@@ -20,25 +21,26 @@ class LanguageFilter(RapidataFilter):
20
21
  This will limit the order to be shown to only people who have their phone set to english or german
21
22
  """
22
23
 
23
- def __init__(self, language_codes: list[str]):
24
- if not isinstance(language_codes, list):
25
- raise ValueError("Language codes must be a list")
26
-
27
- # check that all characters in the language codes are lowercase
28
- if not all([code.islower() for code in language_codes]):
29
- raise ValueError("Language codes must be lowercase")
30
-
31
- for code in language_codes:
32
- if not len(code) == 2:
33
- raise ValueError("Language codes must be two characters long")
34
-
35
- self.languages = language_codes
24
+ language_codes: list[str]
25
+
26
+ @field_validator("language_codes")
27
+ @classmethod
28
+ def validate_language_codes(cls, codes: list[str]) -> list[str]:
29
+ validated = []
30
+ for code in codes:
31
+ if len(code) != 2:
32
+ raise ValueError(
33
+ f"Language codes must be length 2. Invalid code: '{code}'"
34
+ )
35
+ if code != code.lower():
36
+ logger.warning(
37
+ f"Language code '{code}' should be lowercase. It will be lowercased automatically."
38
+ )
39
+ validated.append(code.lower())
40
+ return validated
36
41
 
37
42
  def _to_model(self):
38
- return LanguageUserFilterModel(_t="LanguageFilter", languages=self.languages)
39
-
40
- def __str__(self):
41
- return f"LanguageFilter({self.languages})"
42
-
43
- def __repr__(self):
44
- return f"LanguageFilter({self.languages})"
43
+ return LanguageUserFilterModel(
44
+ _t="LanguageFilter",
45
+ languages=self.language_codes,
46
+ )
@@ -4,9 +4,10 @@ from rapidata.api_client.models.not_user_filter_model import NotUserFilterModel
4
4
  from rapidata.api_client.models.and_user_filter_model_filters_inner import (
5
5
  AndUserFilterModelFiltersInner,
6
6
  )
7
+ from pydantic import BaseModel, ConfigDict
7
8
 
8
9
 
9
- class NotFilter(RapidataFilter):
10
+ class NotFilter(RapidataFilter, BaseModel):
10
11
  """A filter that negates another filter's condition.
11
12
  This class implements a logical NOT operation on a given filter, inverting its results.
12
13
 
@@ -23,20 +24,12 @@ class NotFilter(RapidataFilter):
23
24
  This will limit the order to be shown to only people who have their phone set to a language other than English.
24
25
  """
25
26
 
26
- def __init__(self, filter: RapidataFilter):
27
- if not isinstance(filter, RapidataFilter):
28
- raise ValueError("Filter must be a RapidataFilter object")
27
+ model_config = ConfigDict(arbitrary_types_allowed=True)
29
28
 
30
- self.filter = filter
29
+ filter: RapidataFilter
31
30
 
32
31
  def _to_model(self):
33
32
  return NotUserFilterModel(
34
33
  _t="NotFilter",
35
34
  filter=AndUserFilterModelFiltersInner(self.filter._to_model()),
36
35
  )
37
-
38
- def __str__(self) -> str:
39
- return f"NotFilter(filter={self.filter})"
40
-
41
- def __repr__(self) -> str:
42
- return f"NotFilter(filter={self.filter!r})"
@@ -1,12 +1,12 @@
1
- from typing import Any
2
1
  from rapidata.rapidata_client.filter._base_filter import RapidataFilter
3
2
  from rapidata.api_client.models.or_user_filter_model import OrUserFilterModel
4
3
  from rapidata.api_client.models.and_user_filter_model_filters_inner import (
5
4
  AndUserFilterModelFiltersInner,
6
5
  )
6
+ from pydantic import BaseModel, ConfigDict
7
7
 
8
8
 
9
- class OrFilter(RapidataFilter):
9
+ class OrFilter(RapidataFilter, BaseModel):
10
10
  """A filter that combines multiple filters with a logical OR operation.
11
11
  This class implements a logical OR operation on a list of filters, where the condition is met if any of the filters' conditions are met.
12
12
 
@@ -23,11 +23,9 @@ class OrFilter(RapidataFilter):
23
23
  This will match users who either have their phone set to English OR are located in the United States.
24
24
  """
25
25
 
26
- def __init__(self, filters: list[RapidataFilter]):
27
- if not all(isinstance(filter, RapidataFilter) for filter in filters):
28
- raise ValueError("Filters must be a RapidataFilter object")
26
+ model_config = ConfigDict(arbitrary_types_allowed=True)
29
27
 
30
- self.filters = filters
28
+ filters: list[RapidataFilter]
31
29
 
32
30
  def _to_model(self):
33
31
  return OrUserFilterModel(
@@ -37,9 +35,3 @@ class OrFilter(RapidataFilter):
37
35
  for filter in self.filters
38
36
  ],
39
37
  )
40
-
41
- def __str__(self) -> str:
42
- return f"OrFilter(filters={self.filters})"
43
-
44
- def __repr__(self) -> str:
45
- return f"OrFilter(filters={self.filters!r})"
@@ -4,9 +4,10 @@ from rapidata.api_client.models.response_count_user_filter_model import (
4
4
  ResponseCountUserFilterModel,
5
5
  )
6
6
  from rapidata.api_client.models.comparison_operator import ComparisonOperator
7
+ from pydantic import BaseModel, ConfigDict
7
8
 
8
9
 
9
- class ResponseCountFilter(RapidataFilter):
10
+ class ResponseCountFilter(RapidataFilter, BaseModel):
10
11
  """ResponseCountFilter Class
11
12
  Can be used to filter users based on the number of responses they have given on validation tasks with the specified dimension.
12
13
 
@@ -34,13 +35,11 @@ class ResponseCountFilter(RapidataFilter):
34
35
  This will filter users who have a response count greater than 10 for the "electrical" dimension.
35
36
  """
36
37
 
37
- def __init__(
38
- self, response_count: int, dimension: str, operator: ComparisonOperator
39
- ):
38
+ model_config = ConfigDict(arbitrary_types_allowed=True)
40
39
 
41
- self.response_count = response_count
42
- self.dimension = dimension
43
- self.operator = operator
40
+ response_count: int
41
+ dimension: str
42
+ operator: ComparisonOperator
44
43
 
45
44
  def _to_model(self):
46
45
  return ResponseCountUserFilterModel(
@@ -49,9 +48,3 @@ class ResponseCountFilter(RapidataFilter):
49
48
  dimension=self.dimension,
50
49
  operator=self.operator,
51
50
  )
52
-
53
- def __str__(self) -> str:
54
- return f"ResponseCountFilter(response_count={self.response_count}, dimension={self.dimension}, operator={self.operator})"
55
-
56
- def __repr__(self) -> str:
57
- return f"ResponseCountFilter(response_count={self.response_count!r}, dimension={self.dimension!r}, operator={self.operator!r})"
@@ -1,11 +1,12 @@
1
- from typing import Any
1
+ from pydantic_core.core_schema import FieldValidationInfo
2
2
  from rapidata.rapidata_client.filter._base_filter import RapidataFilter
3
3
  from rapidata.api_client.models.user_score_user_filter_model import (
4
4
  UserScoreUserFilterModel,
5
5
  )
6
+ from pydantic import BaseModel, field_validator, model_validator
6
7
 
7
8
 
8
- class UserScoreFilter(RapidataFilter):
9
+ class UserScoreFilter(RapidataFilter, BaseModel):
9
10
  """UserScoreFilter Class
10
11
 
11
12
  Can be used to filter who to target based on their user score.
@@ -22,22 +23,22 @@ class UserScoreFilter(RapidataFilter):
22
23
  This will only show the order to users that have a UserScore of >=0.5 and <=0.9
23
24
  """
24
25
 
25
- def __init__(
26
- self,
27
- lower_bound: float = 0.0,
28
- upper_bound: float = 1.0,
29
- dimension: str | None = None,
30
- ):
31
- if lower_bound < 0 or lower_bound > 1:
32
- raise ValueError("The lower bound must be between 0 and 1.")
33
- if upper_bound < 0 or upper_bound > 1:
34
- raise ValueError("The upper bound must be between 0 and 1.")
35
- if lower_bound >= upper_bound:
36
- raise ValueError("The lower bound must be less than the upper bound.")
37
-
38
- self.upper_bound = upper_bound
39
- self.lower_bound = lower_bound
40
- self.dimension = dimension
26
+ lower_bound: float = 0.0
27
+ upper_bound: float = 1.0
28
+ dimension: str | None = None
29
+
30
+ @field_validator("lower_bound", "upper_bound")
31
+ @classmethod
32
+ def validate_bounds(cls, v: float, info: FieldValidationInfo) -> float:
33
+ if v < 0 or v > 1:
34
+ raise ValueError(f"{info.field_name} must be between 0 and 1")
35
+ return v
36
+
37
+ @model_validator(mode="after")
38
+ def validate_bounds_relationship(self) -> "UserScoreFilter":
39
+ if self.lower_bound >= self.upper_bound:
40
+ raise ValueError("lower_bound must be less than upper_bound")
41
+ return self
41
42
 
42
43
  def _to_model(self):
43
44
  return UserScoreUserFilterModel(
@@ -46,9 +47,3 @@ class UserScoreFilter(RapidataFilter):
46
47
  lowerbound=self.lower_bound,
47
48
  dimension=self.dimension,
48
49
  )
49
-
50
- def __str__(self) -> str:
51
- return f"UserScoreFilter(lower_bound={self.lower_bound}, upper_bound={self.upper_bound}, dimension={self.dimension})"
52
-
53
- def __repr__(self) -> str:
54
- return f"UserScoreFilter(lower_bound={self.lower_bound!r}, upper_bound={self.upper_bound!r}, dimension={self.dimension!r})"
@@ -1,4 +1,4 @@
1
- from typing import Literal, Optional, Sequence
1
+ from typing import Literal, Optional, Sequence, get_args
2
2
  import random
3
3
  import urllib.parse
4
4
  import webbrowser
@@ -43,6 +43,8 @@ from rapidata.rapidata_client.api.rapidata_api_client import (
43
43
  suppress_rapidata_error_logging,
44
44
  )
45
45
 
46
+ StickyStateLiteral = Literal["Temporary", "Permanent", "Passive"]
47
+
46
48
 
47
49
  class RapidataOrderBuilder:
48
50
  """Builder object for creating Rapidata orders.
@@ -71,9 +73,7 @@ class RapidataOrderBuilder:
71
73
  self.__selections: list[RapidataSelection] = []
72
74
  self.__priority: int | None = None
73
75
  self.__datapoints: list[Datapoint] = []
74
- self.__sticky_state_value: Literal["None", "Temporary", "Permanent"] | None = (
75
- None
76
- )
76
+ self.__sticky_state_value: StickyStateLiteral | None = None
77
77
  self.__validation_set_manager: ValidationSetManager = ValidationSetManager(
78
78
  self.__openapi_service
79
79
  )
@@ -147,6 +147,7 @@ class RapidataOrderBuilder:
147
147
  self.__openapi_service.validation_api.validation_set_recommended_get(
148
148
  asset_type=[self.__datapoints[0].get_asset_type()],
149
149
  modality=[self.__workflow.modality],
150
+ instruction=self.__workflow._get_instruction(),
150
151
  prompt_type=[
151
152
  t.value for t in self.__datapoints[0].get_prompt_type()
152
153
  ],
@@ -453,18 +454,16 @@ class RapidataOrderBuilder:
453
454
  return self
454
455
 
455
456
  def _sticky_state(
456
- self, sticky_state: Literal["None", "Temporary", "Permanent"] | None = None
457
+ self, sticky_state: StickyStateLiteral | None = None
457
458
  ) -> "RapidataOrderBuilder":
458
459
  """
459
460
  Set the sticky state for the order.
460
461
  """
461
- if sticky_state is not None and sticky_state not in [
462
- "None",
463
- "Temporary",
464
- "Permanent",
465
- ]:
466
- raise TypeError(
467
- "Sticky state must be of type Literal['None', 'Temporary', 'Permanent']."
462
+ sticky_state_valid_values = get_args(StickyStateLiteral)
463
+
464
+ if sticky_state is not None and sticky_state not in sticky_state_valid_values:
465
+ raise ValueError(
466
+ f"Sticky state must be one of {sticky_state_valid_values} or None"
468
467
  )
469
468
 
470
469
  self.__sticky_state_value = sticky_state
@@ -1,4 +1,4 @@
1
- from typing import Sequence, Optional, Literal
1
+ from typing import Sequence, Optional, Literal, get_args
2
2
  from itertools import zip_longest
3
3
 
4
4
  from rapidata.rapidata_client.config.tracer import tracer
@@ -41,7 +41,7 @@ from rapidata.api_client.models.filter import Filter
41
41
  from rapidata.api_client.models.filter_operator import FilterOperator
42
42
  from rapidata.api_client.models.sort_criterion import SortCriterion
43
43
  from rapidata.api_client.models.sort_direction import SortDirection
44
-
44
+ from rapidata.rapidata_client.order._rapidata_order_builder import StickyStateLiteral
45
45
 
46
46
  from tqdm import tqdm
47
47
 
@@ -61,7 +61,7 @@ class RapidataOrderManager:
61
61
  self.settings = RapidataSettings
62
62
  self.selections = RapidataSelections
63
63
  self.__priority: int | None = None
64
- self.__sticky_state: Literal["None", "Temporary", "Permanent"] | None = None
64
+ self.__sticky_state: StickyStateLiteral | None = None
65
65
  self.__asset_uploader = AssetUploader(openapi_service)
66
66
  logger.debug("RapidataOrderManager initialized")
67
67
 
@@ -172,21 +172,21 @@ class RapidataOrderManager:
172
172
  logger.debug("Order created: %s", order)
173
173
  return order
174
174
 
175
- def _set_priority(self, priority: int):
176
- if not isinstance(priority, int):
177
- raise TypeError("Priority must be an integer")
175
+ def _set_priority(self, priority: int | None):
176
+ if priority is not None and not isinstance(priority, int):
177
+ raise TypeError("Priority must be an integer or None")
178
178
 
179
- if priority < 0:
180
- raise ValueError("Priority must be greater than 0")
179
+ if priority is not None and priority < 0:
180
+ raise ValueError("Priority must be greater than 0 or None")
181
181
 
182
182
  self.__priority = priority
183
183
 
184
- def _set_sticky_state(
185
- self, sticky_state: Literal["None", "Temporary", "Permanent"]
186
- ):
187
- if sticky_state not in ["None", "Temporary", "Permanent"]:
184
+ def _set_sticky_state(self, sticky_state: StickyStateLiteral | None):
185
+ sticky_state_valid_values = get_args(StickyStateLiteral)
186
+
187
+ if sticky_state is not None and sticky_state not in sticky_state_valid_values:
188
188
  raise ValueError(
189
- "Sticky state must be one of 'None', 'Temporary', 'Permanent'"
189
+ f"Sticky state must be one of {sticky_state_valid_values} or None"
190
190
  )
191
191
 
192
192
  self.__sticky_state = sticky_state
@@ -44,6 +44,10 @@ class Workflow(ABC):
44
44
  ):
45
45
  pass
46
46
 
47
+ @abstractmethod
48
+ def _get_instruction(self) -> str:
49
+ pass
50
+
47
51
  @abstractmethod
48
52
  def _to_model(
49
53
  self,
@@ -35,6 +35,9 @@ class ClassifyWorkflow(Workflow):
35
35
  self._instruction = instruction
36
36
  self._answer_options = answer_options
37
37
 
38
+ def _get_instruction(self) -> str:
39
+ return self._instruction
40
+
38
41
  def _to_dict(self) -> dict[str, Any]:
39
42
  return {
40
43
  **super()._to_dict(),
@@ -31,6 +31,9 @@ class CompareWorkflow(Workflow):
31
31
  self._instruction = instruction
32
32
  self._a_b_names = a_b_names
33
33
 
34
+ def _get_instruction(self) -> str:
35
+ return self._instruction
36
+
34
37
  def _to_dict(self) -> dict[str, Any]:
35
38
  return {
36
39
  **super()._to_dict(),
@@ -16,6 +16,9 @@ class DrawWorkflow(Workflow):
16
16
  super().__init__(type="SimpleWorkflowConfig")
17
17
  self._target = target
18
18
 
19
+ def _get_instruction(self) -> str:
20
+ return self._target
21
+
19
22
  def _to_model(self) -> SimpleWorkflowModel:
20
23
  blueprint = LineRapidBlueprint(_t="LineBlueprint", target=self._target)
21
24
 
@@ -22,6 +22,9 @@ class EvaluationWorkflow(Workflow):
22
22
  self.validation_set_id = validation_set_id
23
23
  self.should_accept_incorrect = should_accept_incorrect
24
24
 
25
+ def _get_instruction(self) -> str:
26
+ return ""
27
+
25
28
  def _to_model(self):
26
29
  return EvaluationWorkflowModel(
27
30
  _t="EvaluationWorkflow",
@@ -33,6 +33,9 @@ class FreeTextWorkflow(Workflow):
33
33
  self._instruction = instruction
34
34
  self._validation_system_prompt = validation_system_prompt
35
35
 
36
+ def _get_instruction(self) -> str:
37
+ return self._instruction
38
+
36
39
  def _to_dict(self) -> dict[str, Any]:
37
40
  return {
38
41
  **super()._to_dict(),
@@ -16,6 +16,9 @@ class LocateWorkflow(Workflow):
16
16
  super().__init__(type="SimpleWorkflowConfig")
17
17
  self._target = target
18
18
 
19
+ def _get_instruction(self) -> str:
20
+ return self._target
21
+
19
22
  def _to_model(self) -> SimpleWorkflowModel:
20
23
  blueprint = LocateRapidBlueprint(_t="LocateBlueprint", target=self._target)
21
24
 
@@ -47,10 +47,12 @@ class RankingWorkflow(Workflow):
47
47
  file_uploader is not None
48
48
  ), "File uploader is required if media_context is provided"
49
49
  self.metadatas.append(
50
- MediaAssetMetadata(file_uploader.upload_asset(media_context))
50
+ MediaAssetMetadata(
51
+ internal_file_name=file_uploader.upload_asset(media_context)
52
+ )
51
53
  )
52
54
  if context:
53
- self.metadatas.append(PromptMetadata(context))
55
+ self.metadatas.append(PromptMetadata(prompt=context))
54
56
 
55
57
  self.criteria = criteria
56
58
  self.total_comparison_budget = total_comparison_budget
@@ -73,6 +75,9 @@ class RankingWorkflow(Workflow):
73
75
  scalingFactor=elo_scaling_factor,
74
76
  )
75
77
 
78
+ def _get_instruction(self) -> str:
79
+ return self.criteria
80
+
76
81
  def _to_model(self) -> CompareWorkflowModel:
77
82
 
78
83
  return CompareWorkflowModel(
@@ -31,6 +31,9 @@ class SelectWordsWorkflow(Workflow):
31
31
  super().__init__(type="SimpleWorkflowConfig")
32
32
  self._instruction = instruction
33
33
 
34
+ def _get_instruction(self) -> str:
35
+ return self._instruction
36
+
34
37
  def _to_model(self) -> SimpleWorkflowModel:
35
38
  blueprint = TranscriptionRapidBlueprint(
36
39
  _t="TranscriptionBlueprint", title=self._instruction
@@ -29,6 +29,9 @@ class TimestampWorkflow(Workflow):
29
29
  super().__init__(type="SimpleWorkflowConfig")
30
30
  self._instruction = instruction
31
31
 
32
+ def _get_instruction(self) -> str:
33
+ return self._instruction
34
+
32
35
  def _to_model(self) -> SimpleWorkflowModel:
33
36
  blueprint = ScrubRapidBlueprint(_t="ScrubBlueprint", target=self._instruction)
34
37
 
@@ -92,7 +92,6 @@ from rapidata.rapidata_client.exceptions.failed_upload_exception import (
92
92
  )
93
93
 
94
94
  # Utility Types
95
- from rapidata.rapidata_client.country_codes.country_codes import CountryCodes
96
95
  from rapidata.rapidata_client.demographic.demographic_manager import DemographicManager
97
96
 
98
97
  # API Client Types
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rapidata
3
- Version: 2.42.2
3
+ Version: 2.42.4
4
4
  Summary: Rapidata package containing the Rapidata Python Client to interact with the Rapidata Web API in an easy way.
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -1,4 +1,4 @@
1
- rapidata/__init__.py,sha256=JE3wmzFPMDBFCoTTrU5UkvBELIuoQtdUwG6wPOUZbD0,875
1
+ rapidata/__init__.py,sha256=AzEtXzIsctxegCTuNV6z2LvoGylidqI_UEVC0SgmTS8,857
2
2
  rapidata/api_client/__init__.py,sha256=Rh2aAoa6nDv09Z7cpTNdrPotXixBcNN_2VevCDD1goc,37144
3
3
  rapidata/api_client/api/__init__.py,sha256=CaZJ54mxbAEzAFd0Cjy0mfiUabD-d_7tqVOgjU4RxZI,1749
4
4
  rapidata/api_client/api/asset_api.py,sha256=buYMBGvg5_SLkJ7aG07c7_1rT6TXTCqoLfoV8O2nJhM,34442
@@ -599,7 +599,7 @@ rapidata/api_client/models/workflow_state.py,sha256=5LAK1se76RCoozeVB6oxMPb8p_5b
599
599
  rapidata/api_client/models/zip_entry_file_wrapper.py,sha256=-c8uJo-Dd-FGYPLzUR8sHV2waucFoDwEaJ_ztDGW7vc,5830
600
600
  rapidata/api_client/rest.py,sha256=rtIMcgINZOUaDFaJIinJkXRSddNJmXvMRMfgO2Ezk2o,10835
601
601
  rapidata/api_client_README.md,sha256=0AWEwcE005y5Q8IBzgEWgOa-iwqImdbY99RnQnlei70,63261
602
- rapidata/rapidata_client/__init__.py,sha256=8ofFfjLRWUvd6Ei2w3gQmycYNnnkZpR2dW6ifxC5OWY,1120
602
+ rapidata/rapidata_client/__init__.py,sha256=j9nyFoKDOu8LyV9jcYaOqOL4kAbLf_TYaZkAg20969c,1080
603
603
  rapidata/rapidata_client/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
604
604
  rapidata/rapidata_client/api/rapidata_api_client.py,sha256=9385bND7sDuXfmq0AFgea_RrtuT73NA2CWG_9aIoGok,8945
605
605
  rapidata/rapidata_client/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -618,8 +618,6 @@ rapidata/rapidata_client/config/order_config.py,sha256=XxRZERzUUA9md6-PVlV__eCw8
618
618
  rapidata/rapidata_client/config/rapidata_config.py,sha256=mURnKdl5-2sE4e_IYY9-aBkix6a12t47otEErGE_q0c,1507
619
619
  rapidata/rapidata_client/config/tracer.py,sha256=9P27QybtkjJ0U5ocPkIu58DUQB-MgVksQOMhuwKHKcY,4687
620
620
  rapidata/rapidata_client/config/upload_config.py,sha256=hjefl-w9WaCNeCEe6hdnrAQEMjgDy-r1zgUUIFR68wk,473
621
- rapidata/rapidata_client/country_codes/__init__.py,sha256=FB9Dcks44J6C6YBSYmTmNZ71tE130x6NO_3aLJ8fKzQ,40
622
- rapidata/rapidata_client/country_codes/country_codes.py,sha256=ePHqeb7y9DWQZAnddBzPx1puYBcrgUjdR2sbFijuFD8,283
623
621
  rapidata/rapidata_client/datapoints/__init__.py,sha256=pRjH6YQLbIHOumykMgplKxFfhj6g7a2Dh2FPdFNyNsg,222
624
622
  rapidata/rapidata_client/datapoints/_asset_uploader.py,sha256=ie9MZfzhxa0ZrRveJ516cgwvA6QIeVIxN3g5ikwLOH0,2605
625
623
  rapidata/rapidata_client/datapoints/_datapoint.py,sha256=ZRsZJRy3r4zZOMAgcMgNd7crqMDcj7qxuYfkEbU8bWk,2929
@@ -628,39 +626,39 @@ rapidata/rapidata_client/datapoints/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW
628
626
  rapidata/rapidata_client/datapoints/assets/constants.py,sha256=AwQGQyPqQ1ozAhFdQvRYWi-DUcRQ32jJD4tWy7htQfs,257
629
627
  rapidata/rapidata_client/datapoints/metadata/__init__.py,sha256=RC0x5Qr5JUII9ItmPMrRB7EtGtJmO-yquUfbrdCx7EM,368
630
628
  rapidata/rapidata_client/datapoints/metadata/_base_metadata.py,sha256=t2kFqaz5BkEaYYj93Pw3h7zWVDq_S5ZkDxjDIRd21_I,189
631
- rapidata/rapidata_client/datapoints/metadata/_media_asset_metadata.py,sha256=Qq6M_FPEryd9YjZ3-5ZGfXM6xKh-j1pN-xorHxFyq0E,828
632
- rapidata/rapidata_client/datapoints/metadata/_private_text_metadata.py,sha256=pQWyOy1icL9071OEcFRjmFqclTHV8SgcBcLjV7q61Us,546
633
- rapidata/rapidata_client/datapoints/metadata/_prompt_identifier_metadata.py,sha256=TjnxZ4YpJUUu4pnoFZTySTV7z3PsA8d2Kuywe8rFRG8,497
634
- rapidata/rapidata_client/datapoints/metadata/_prompt_metadata.py,sha256=U5-lSZ-RSiFc5pOXai9-a9nDfArO413D1AYIpVr2Txg,572
635
- rapidata/rapidata_client/datapoints/metadata/_public_text_metadata.py,sha256=tX8GIOQzMsbHlchJqaR7k_9I74z52aXMeYudvx56YYU,540
636
- rapidata/rapidata_client/datapoints/metadata/_select_words_metadata.py,sha256=T8wnF_QOssDxXbD646QczDZ-IWToly1JvSvd8w5qvdc,605
629
+ rapidata/rapidata_client/datapoints/metadata/_media_asset_metadata.py,sha256=nhP71MW5gyJIPmd4cmFsqnIQ6feqBckWXpkXxdGsHtw,766
630
+ rapidata/rapidata_client/datapoints/metadata/_private_text_metadata.py,sha256=vuvGs1NKPLBqhm2S-UCMvKaZ9MoGJ2CtWDr20yUOk-M,477
631
+ rapidata/rapidata_client/datapoints/metadata/_prompt_identifier_metadata.py,sha256=m8-3lvexHIf79U4KO53qNRvGsCQJ2f-hb2pozoCvNyU,452
632
+ rapidata/rapidata_client/datapoints/metadata/_prompt_metadata.py,sha256=rHfwP89kpNMN0rKCCKXyMcc5scnI07d9nhqZZct56Oo,437
633
+ rapidata/rapidata_client/datapoints/metadata/_public_text_metadata.py,sha256=pNwOdeh41iMbDAMlzoAfwU4Sf7dyV_LrJ4m6aSAZkN8,471
634
+ rapidata/rapidata_client/datapoints/metadata/_select_words_metadata.py,sha256=v8SHwxU1yh7FqrjDmMqYiX1tM5iN5YXJOOHeLW5AJzg,558
637
635
  rapidata/rapidata_client/demographic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
638
- rapidata/rapidata_client/demographic/demographic_manager.py,sha256=l-QXPTzV_oJpQA2l902x4zmaDdqoPNTjEk-hYH6XOSY,1828
636
+ rapidata/rapidata_client/demographic/demographic_manager.py,sha256=qMqBOFzpcMUnmAYZANaaE3DPwGlq6cfE_RWdHuvQBZ0,1800
639
637
  rapidata/rapidata_client/exceptions/__init__.py,sha256=2hbWRgjlCGuoLPVDloQmmH81uzm9F2OAX2iFGCJyRu8,59
640
638
  rapidata/rapidata_client/exceptions/failed_upload_exception.py,sha256=m_HE-JOzbNxMsLhaFENM4pgV9dknACc7p6jcvpzsBJQ,675
641
639
  rapidata/rapidata_client/filter/__init__.py,sha256=j_Kfz_asNVxwp56SAN2saB7ZAHg3smL5_W2sSitmuJY,548
642
- rapidata/rapidata_client/filter/_base_filter.py,sha256=NVa2oWgtXD9kmXWyMkYZZ-2RYzgcN0hO76uGrEXXLEs,2384
643
- rapidata/rapidata_client/filter/age_filter.py,sha256=mVZaKyBoK-mml_oFox97l1yUXvINPk-2cEimuU_FJac,908
644
- rapidata/rapidata_client/filter/and_filter.py,sha256=6RL4hbC6UjiC_ID8Oc2OaFz_QlDFIRtxODL65eK62yI,1586
645
- rapidata/rapidata_client/filter/campaign_filter.py,sha256=jvcQWwVb_L9Vl3R7hojzwLQbi0HKigGsSVR8JtZzR2Y,930
646
- rapidata/rapidata_client/filter/country_filter.py,sha256=bRxRVXcpH2vkAGZUZ9rQdyXpdWewUYQvVBIkHdbE-9Q,1137
647
- rapidata/rapidata_client/filter/custom_filter.py,sha256=TGbqTUm7UAhbYLSGRpi04EqZMb8AQNHEcExeJ81LNf0,1109
648
- rapidata/rapidata_client/filter/gender_filter.py,sha256=vzGE2qf9EpI_D_ynfur2--LSzBUaA5waVS86t6-vAYg,887
649
- rapidata/rapidata_client/filter/language_filter.py,sha256=BoHBagrPfUurNOjGEY3tCd4Ao4aoRlwHwys9IEg-8_k,1429
640
+ rapidata/rapidata_client/filter/_base_filter.py,sha256=Axfi7kb303p-oQWRc22Ge22NpylKyqixQOVF_4NWg1Q,2300
641
+ rapidata/rapidata_client/filter/age_filter.py,sha256=fBfiAUcUYMz7bIyKgFuD1r_TvBj0ujR-RUBQrcsg5tE,760
642
+ rapidata/rapidata_client/filter/and_filter.py,sha256=bc3BjeJChbW87wQdymg_YKU5dO8c3pNDLprdQje-dIM,1329
643
+ rapidata/rapidata_client/filter/campaign_filter.py,sha256=rZQ7aw5rXRJrAgU0MjytgJDREClQ0MxA8KHGe-ndiV0,688
644
+ rapidata/rapidata_client/filter/country_filter.py,sha256=P8QbANGHArtB0eGYDFgfNpjByBBpYO4Cp_pRIDWIwfc,1242
645
+ rapidata/rapidata_client/filter/custom_filter.py,sha256=27hWLuAe39uxFuE--ifI19nx8x2N8jDz_B68-dubmPg,811
646
+ rapidata/rapidata_client/filter/gender_filter.py,sha256=_MIrJ2GbzCvHmVE4v7lJf4qxHzegTFchRS_vZDmS7CE,752
647
+ rapidata/rapidata_client/filter/language_filter.py,sha256=9WK2TTGsqMzJR7nGVne9njHzVk5t_7NiMcIasl6vrKc,1475
650
648
  rapidata/rapidata_client/filter/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
651
649
  rapidata/rapidata_client/filter/models/age_group.py,sha256=nmsT7DOsngNoJ4SeYy_C92VOjNnZOfNiIM0HTGfzWbc,1191
652
650
  rapidata/rapidata_client/filter/models/gender.py,sha256=oG2AgpRasK1YYkEivFzccjaifWmfCW61Um4APvaWV1g,621
653
651
  rapidata/rapidata_client/filter/new_user_filter.py,sha256=HT0gXct1j2_0AdbSn-9DhrwWtLSGLECWNGZKQCoglFM,344
654
- rapidata/rapidata_client/filter/not_filter.py,sha256=PlVcMMuByBJ4iaZoFD8QHTdgLtgSBWcHV0vcRCc7fv0,1376
655
- rapidata/rapidata_client/filter/or_filter.py,sha256=4SDVWRh2yv87GjwGpQBIVyuZ23MqyDVpb9pQKuFLzLU,1580
652
+ rapidata/rapidata_client/filter/not_filter.py,sha256=_ruxjgktj7cPIvel695sKYHYEqRsMlWhuJX-COlDL7w,1153
653
+ rapidata/rapidata_client/filter/or_filter.py,sha256=veiKokeoq5v9tz13UKuL_UQLin7B_JiWcLSDsoRRQEU,1302
656
654
  rapidata/rapidata_client/filter/rapidata_filters.py,sha256=B8ptQsaAn1e14Grv8xBYQ4qcU0Vt2VTjEpkk-tyOCTo,2201
657
- rapidata/rapidata_client/filter/response_count_filter.py,sha256=i2u2YQD3_RLQRZyqAceAGLQS3es97Q2n8KTlgfDYMko,2332
658
- rapidata/rapidata_client/filter/user_score_filter.py,sha256=4B3Zzp7aosDFmte3nLPTlXMN4zatT6Wcq5QLIoXqhgI,1910
655
+ rapidata/rapidata_client/filter/response_count_filter.py,sha256=ncOF8eI1KnWnyfnnFbZiwG-czIHi1Mb6U4Sgmj9keGM,1975
656
+ rapidata/rapidata_client/filter/user_score_filter.py,sha256=JmmJxfH0UZ24TJywPWMLkRucWyASp5ToOVITr7FAzkw,1678
659
657
  rapidata/rapidata_client/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
660
- rapidata/rapidata_client/order/_rapidata_order_builder.py,sha256=RZwRyPzxR_D3aVZU-K98-FqIbOpzXNmmkJzzmYwYJnU,16828
658
+ rapidata/rapidata_client/order/_rapidata_order_builder.py,sha256=FTJJRCW9KehIlqELOXmKeLhuGcLj9m9ImEU1agOIRa4,16915
661
659
  rapidata/rapidata_client/order/dataset/_rapidata_dataset.py,sha256=8EhoRVBxWMbp1mtS56Uogg2dwFC2vySw5hNqTPDTHzM,6345
662
660
  rapidata/rapidata_client/order/rapidata_order.py,sha256=w41HUWE6q9L2Stx0ScZdKb7qLjWFIUPMMDOe2fElLvM,14481
663
- rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=_IS2ONiINmq4ga_2oWsbSluwC-SEv03yo_aKWluOGQk,40823
661
+ rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=Ya8s40hzigIIpo9WphL67sguuqY_3q-Z4AL8IHmX-ZI,41028
664
662
  rapidata/rapidata_client/order/rapidata_results.py,sha256=weL4S14fzug3ZOJbQk9Oj-4tv2jx5aZAMp7VJ-a6Qq4,8437
665
663
  rapidata/rapidata_client/rapidata_client.py,sha256=5BJMstjJFmBwkflC_YnzlhoOF3SKP3u2wQ56G_hvB3Q,5862
666
664
  rapidata/rapidata_client/referee/__init__.py,sha256=J8oZJNUduPr-Tmn8iJwR-qBiSv7owhUFcEzXTRETecw,155
@@ -702,22 +700,22 @@ rapidata/rapidata_client/validation/rapids/rapids.py,sha256=E4O4p2br0g9lgB3tOdfE
702
700
  rapidata/rapidata_client/validation/rapids/rapids_manager.py,sha256=YqGxnqJ2vYfAywXJDujQEBrYnlf0URdLxQ7hTR1JeOI,16225
703
701
  rapidata/rapidata_client/validation/validation_set_manager.py,sha256=uBKdf-13LKeetvVz425292L6jSYBNrsM08S-n9xEXAw,35099
704
702
  rapidata/rapidata_client/workflow/__init__.py,sha256=6kfMN7TQVpiQNGjNHg3X7KdnCyYe3K2TIq7ZVEatQcU,476
705
- rapidata/rapidata_client/workflow/_base_workflow.py,sha256=UoB9mh0azAf8_IgH6ujGsRQS9PxSiVCSDsAfLjV7wgM,1570
706
- rapidata/rapidata_client/workflow/_classify_workflow.py,sha256=gJ-Us3bCzbgiTyIKWLFjCJQS6ClqAnObLtZgCJGUASI,2546
707
- rapidata/rapidata_client/workflow/_compare_workflow.py,sha256=AwLlV6246Nd2PvsTUw4loZekK44HANv_pNOZWkPWZiE,2177
708
- rapidata/rapidata_client/workflow/_draw_workflow.py,sha256=CKbNGp1NdlvipO_Rc-We_JkocRsE2NY32iXg-pPBvtM,1347
709
- rapidata/rapidata_client/workflow/_evaluation_workflow.py,sha256=3b71NpxAdmYfRTZCZHq-UoQFqY7CDlMup6VwE7412kc,1732
710
- rapidata/rapidata_client/workflow/_free_text_workflow.py,sha256=d5vZDZ_ZdzP4Crecm-cm-vBhkJkx5EPtAFAuSVH2EwI,2664
711
- rapidata/rapidata_client/workflow/_locate_workflow.py,sha256=zqE5XZALqdcyEW_e_gVF61pLOmt85O7sDRU28qLuAa4,1371
712
- rapidata/rapidata_client/workflow/_ranking_workflow.py,sha256=Rtc-Yj99gpM3JY4hH7QqGeL0o5LSClv2xxNCl-9leVA,4436
713
- rapidata/rapidata_client/workflow/_select_words_workflow.py,sha256=huxVRP4G9nhHr3i37A9r91SHSUq5YXTvC0qe92W9RGM,2210
714
- rapidata/rapidata_client/workflow/_timestamp_workflow.py,sha256=k1MZ1_nYysibDYWJ5aogiIOjRYFiFTTEnxsK2kCXAtw,1774
703
+ rapidata/rapidata_client/workflow/_base_workflow.py,sha256=ctbCiQ1VKR9mTKl3MRubtSChrPcbjjZ-xP61f1PBBwc,1643
704
+ rapidata/rapidata_client/workflow/_classify_workflow.py,sha256=KDdASQL9u-PSosHrtvKAYc5P_Hy94RcB16gK2RtbacE,2619
705
+ rapidata/rapidata_client/workflow/_compare_workflow.py,sha256=Yf8NLxrK8MHbmXLvghy3-xvQosVW3CpYy9uRO1y2xpg,2250
706
+ rapidata/rapidata_client/workflow/_draw_workflow.py,sha256=O7r_bltnGfxQV_TOzyC_5Z2-VeAPH-yMSA5WDEu4NzE,1415
707
+ rapidata/rapidata_client/workflow/_evaluation_workflow.py,sha256=F4-K-bDYh9qjq8S_L8VL5E9pzAO1iTRec47srFVTL3U,1790
708
+ rapidata/rapidata_client/workflow/_free_text_workflow.py,sha256=pf2z2lanj7v6Zo-nYc0x8XVghK4JfX7bfsHk-TVOV1c,2737
709
+ rapidata/rapidata_client/workflow/_locate_workflow.py,sha256=7UXapQBmuUsFMpvG6TPk0D9g9PrCa9y92Y4nb1ecjcw,1439
710
+ rapidata/rapidata_client/workflow/_ranking_workflow.py,sha256=4a9bK-AQJ_q9ud0u6vMfBaTgOdgd9nR35nN9S6Z3KUk,4569
711
+ rapidata/rapidata_client/workflow/_select_words_workflow.py,sha256=b3APwuDuMphtOVefOaaOVebcaRcnnVQ6NltZkEPXnCo,2283
712
+ rapidata/rapidata_client/workflow/_timestamp_workflow.py,sha256=totcKhAItkPS7HMrjbr6_CGgKMKzohzpdCxMu0X-vCw,1847
715
713
  rapidata/service/__init__.py,sha256=ULBu1tCwgp055OifUXZKtExkzqXeTa_LRROzjMWAd90,69
716
714
  rapidata/service/credential_manager.py,sha256=T3yL4tXVnibRytxjQkOC-ex3kFGQR5KcKUUAtao4PFw,8698
717
715
  rapidata/service/local_file_service.py,sha256=0Q4LdoEtPFKzgXK2oZ1cQ-X7FipakscjGnnBH8dRFRQ,855
718
716
  rapidata/service/openapi_service.py,sha256=E2zVagI_ri15PK06ITO_VNKYDJ0VZQG1YQ1T6bEIVsY,5566
719
- rapidata/types/__init__.py,sha256=gSGrmWV5gEA6pPfAR5vwSy_DvibO5IjCZDiB7LtlMOQ,6134
720
- rapidata-2.42.2.dist-info/METADATA,sha256=E5-4G2VCDEv5xV4NuLau3VIG3Cb66V8VT6qTH1fTOeY,1479
721
- rapidata-2.42.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
722
- rapidata-2.42.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
723
- rapidata-2.42.2.dist-info/RECORD,,
717
+ rapidata/types/__init__.py,sha256=NLRuTGbTImRv3yIp8we_oqVvCuBd7TDNVlAzkVGs9oo,6056
718
+ rapidata-2.42.4.dist-info/METADATA,sha256=e6zUfiBRzdClJ3UEBQ8uV5QrDgUY_OJHfOwTQ5hnN94,1479
719
+ rapidata-2.42.4.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
720
+ rapidata-2.42.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
721
+ rapidata-2.42.4.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- from .country_codes import CountryCodes
@@ -1,19 +0,0 @@
1
- class CountryCodes:
2
-
3
- ENGLISH_SPEAKING = [
4
- "AU",
5
- "BE",
6
- "CA",
7
- "DK",
8
- "FI",
9
- "IE",
10
- "LU",
11
- "NL",
12
- "NZ",
13
- "NO",
14
- "SG",
15
- "SE",
16
- "GB",
17
- "US",
18
- ]
19
- GERMAN_SPEAKING = ["AT", "DE"]