rapidata 2.42.4__py3-none-any.whl → 2.42.5__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.
- rapidata/__init__.py +1 -1
- rapidata/rapidata_client/filter/_base_filter.py +8 -8
- rapidata/rapidata_client/filter/age_filter.py +3 -0
- rapidata/rapidata_client/filter/and_filter.py +3 -0
- rapidata/rapidata_client/filter/campaign_filter.py +3 -0
- rapidata/rapidata_client/filter/country_filter.py +3 -0
- rapidata/rapidata_client/filter/custom_filter.py +3 -0
- rapidata/rapidata_client/filter/gender_filter.py +3 -0
- rapidata/rapidata_client/filter/language_filter.py +3 -0
- rapidata/rapidata_client/filter/not_filter.py +3 -0
- rapidata/rapidata_client/filter/or_filter.py +3 -0
- rapidata/rapidata_client/filter/response_count_filter.py +7 -0
- rapidata/rapidata_client/filter/user_score_filter.py +7 -0
- {rapidata-2.42.4.dist-info → rapidata-2.42.5.dist-info}/METADATA +1 -1
- {rapidata-2.42.4.dist-info → rapidata-2.42.5.dist-info}/RECORD +17 -17
- {rapidata-2.42.4.dist-info → rapidata-2.42.5.dist-info}/WHEEL +0 -0
- {rapidata-2.42.4.dist-info → rapidata-2.42.5.dist-info}/licenses/LICENSE +0 -0
rapidata/__init__.py
CHANGED
|
@@ -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(
|
|
22
|
+
return OrFilter(self.filters + other.filters)
|
|
23
23
|
else:
|
|
24
|
-
return OrFilter(
|
|
24
|
+
return OrFilter(self.filters + [other])
|
|
25
25
|
# If other is an OrFilter, prepend self to its filters
|
|
26
26
|
elif isinstance(other, OrFilter):
|
|
27
|
-
return OrFilter(
|
|
27
|
+
return OrFilter([self] + other.filters)
|
|
28
28
|
# Neither is an OrFilter, create a new one
|
|
29
29
|
else:
|
|
30
|
-
return OrFilter(
|
|
30
|
+
return OrFilter([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(
|
|
42
|
+
return AndFilter(self.filters + other.filters)
|
|
43
43
|
else:
|
|
44
|
-
return AndFilter(
|
|
44
|
+
return AndFilter(self.filters + [other])
|
|
45
45
|
# If other is an AndFilter, prepend self to its filters
|
|
46
46
|
elif isinstance(other, AndFilter):
|
|
47
|
-
return AndFilter(
|
|
47
|
+
return AndFilter([self] + other.filters)
|
|
48
48
|
# Neither is an AndFilter, create a new one
|
|
49
49
|
else:
|
|
50
|
-
return AndFilter(
|
|
50
|
+
return AndFilter([self, other])
|
|
51
51
|
|
|
52
52
|
def __invert__(self):
|
|
53
53
|
"""Enable the ~ operator to create NotFilter negations."""
|
|
@@ -18,6 +18,9 @@ class CampaignFilter(RapidataFilter, BaseModel):
|
|
|
18
18
|
|
|
19
19
|
campaign_ids: list[str]
|
|
20
20
|
|
|
21
|
+
def __init__(self, campaign_ids: list[str]):
|
|
22
|
+
super().__init__(campaign_ids=campaign_ids)
|
|
23
|
+
|
|
21
24
|
def _to_model(self):
|
|
22
25
|
return CampaignUserFilterModel(
|
|
23
26
|
_t="CampaignFilter",
|
|
@@ -15,6 +15,9 @@ class CountryFilter(RapidataFilter, BaseModel):
|
|
|
15
15
|
|
|
16
16
|
country_codes: list[str]
|
|
17
17
|
|
|
18
|
+
def __init__(self, country_codes: list[str]):
|
|
19
|
+
super().__init__(country_codes=country_codes)
|
|
20
|
+
|
|
18
21
|
@field_validator("country_codes")
|
|
19
22
|
@classmethod
|
|
20
23
|
def validate_country_codes(cls, codes: list[str]) -> list[str]:
|
|
@@ -20,6 +20,9 @@ class CustomFilter(RapidataFilter, BaseModel):
|
|
|
20
20
|
identifier: str
|
|
21
21
|
values: list[str]
|
|
22
22
|
|
|
23
|
+
def __init__(self, identifier: str, values: list[str]):
|
|
24
|
+
super().__init__(identifier=identifier, values=values)
|
|
25
|
+
|
|
23
26
|
def _to_model(self):
|
|
24
27
|
return CustomUserFilterModel(
|
|
25
28
|
_t="CustomFilter",
|
|
@@ -23,6 +23,9 @@ class LanguageFilter(RapidataFilter, BaseModel):
|
|
|
23
23
|
|
|
24
24
|
language_codes: list[str]
|
|
25
25
|
|
|
26
|
+
def __init__(self, language_codes: list[str]):
|
|
27
|
+
super().__init__(language_codes=language_codes)
|
|
28
|
+
|
|
26
29
|
@field_validator("language_codes")
|
|
27
30
|
@classmethod
|
|
28
31
|
def validate_language_codes(cls, codes: list[str]) -> list[str]:
|
|
@@ -41,6 +41,13 @@ class ResponseCountFilter(RapidataFilter, BaseModel):
|
|
|
41
41
|
dimension: str
|
|
42
42
|
operator: ComparisonOperator
|
|
43
43
|
|
|
44
|
+
def __init__(
|
|
45
|
+
self, response_count: int, dimension: str, operator: ComparisonOperator
|
|
46
|
+
):
|
|
47
|
+
super().__init__(
|
|
48
|
+
response_count=response_count, dimension=dimension, operator=operator
|
|
49
|
+
)
|
|
50
|
+
|
|
44
51
|
def _to_model(self):
|
|
45
52
|
return ResponseCountUserFilterModel(
|
|
46
53
|
_t="ResponseCountFilter",
|
|
@@ -27,6 +27,13 @@ class UserScoreFilter(RapidataFilter, BaseModel):
|
|
|
27
27
|
upper_bound: float = 1.0
|
|
28
28
|
dimension: str | None = None
|
|
29
29
|
|
|
30
|
+
def __init__(
|
|
31
|
+
self, lower_bound: float, upper_bound: float, dimension: str | None = None
|
|
32
|
+
):
|
|
33
|
+
super().__init__(
|
|
34
|
+
lower_bound=lower_bound, upper_bound=upper_bound, dimension=dimension
|
|
35
|
+
)
|
|
36
|
+
|
|
30
37
|
@field_validator("lower_bound", "upper_bound")
|
|
31
38
|
@classmethod
|
|
32
39
|
def validate_bounds(cls, v: float, info: FieldValidationInfo) -> float:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
rapidata/__init__.py,sha256=
|
|
1
|
+
rapidata/__init__.py,sha256=g_Z2skYSbi9A5QdchDqynk7kwq0xeSxH1ky3iGaz_oA,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
|
|
@@ -637,23 +637,23 @@ rapidata/rapidata_client/demographic/demographic_manager.py,sha256=qMqBOFzpcMUnm
|
|
|
637
637
|
rapidata/rapidata_client/exceptions/__init__.py,sha256=2hbWRgjlCGuoLPVDloQmmH81uzm9F2OAX2iFGCJyRu8,59
|
|
638
638
|
rapidata/rapidata_client/exceptions/failed_upload_exception.py,sha256=m_HE-JOzbNxMsLhaFENM4pgV9dknACc7p6jcvpzsBJQ,675
|
|
639
639
|
rapidata/rapidata_client/filter/__init__.py,sha256=j_Kfz_asNVxwp56SAN2saB7ZAHg3smL5_W2sSitmuJY,548
|
|
640
|
-
rapidata/rapidata_client/filter/_base_filter.py,sha256=
|
|
641
|
-
rapidata/rapidata_client/filter/age_filter.py,sha256=
|
|
642
|
-
rapidata/rapidata_client/filter/and_filter.py,sha256=
|
|
643
|
-
rapidata/rapidata_client/filter/campaign_filter.py,sha256=
|
|
644
|
-
rapidata/rapidata_client/filter/country_filter.py,sha256=
|
|
645
|
-
rapidata/rapidata_client/filter/custom_filter.py,sha256=
|
|
646
|
-
rapidata/rapidata_client/filter/gender_filter.py,sha256=
|
|
647
|
-
rapidata/rapidata_client/filter/language_filter.py,sha256=
|
|
640
|
+
rapidata/rapidata_client/filter/_base_filter.py,sha256=G8JI7w2i9qFn3siiJ5ALdg49HVp8b_k9mwc0OD67N6I,2236
|
|
641
|
+
rapidata/rapidata_client/filter/age_filter.py,sha256=ivDwZbFU7ee_fgSNSpQKd_XHANKuqjY5VOdopqq1ja8,861
|
|
642
|
+
rapidata/rapidata_client/filter/and_filter.py,sha256=8QW1L5F6flVEWp_j9i954TronHdpJshyykdAOaEvObw,1427
|
|
643
|
+
rapidata/rapidata_client/filter/campaign_filter.py,sha256=obscevbz6TQRJY4HVdKoYPRcbd7xn_-NynHnegLo97c,790
|
|
644
|
+
rapidata/rapidata_client/filter/country_filter.py,sha256=fBvy4H20Tr6vGEwG3TKr4Yg9vg117LxhGMSAtxdVo00,1347
|
|
645
|
+
rapidata/rapidata_client/filter/custom_filter.py,sha256=oz8SY6Bz8r7I6loTnVDvoxeMxAaYh6DhSySdEbTjT4Q,935
|
|
646
|
+
rapidata/rapidata_client/filter/gender_filter.py,sha256=DHfPi4Llv520JVW0Uj6D4eHKM6KnBwPnsabbbxD3u6k,842
|
|
647
|
+
rapidata/rapidata_client/filter/language_filter.py,sha256=PhKANe4eApnC30c4-NmB9uhshQ_0Ebty1d6u9swdURw,1583
|
|
648
648
|
rapidata/rapidata_client/filter/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
649
649
|
rapidata/rapidata_client/filter/models/age_group.py,sha256=nmsT7DOsngNoJ4SeYy_C92VOjNnZOfNiIM0HTGfzWbc,1191
|
|
650
650
|
rapidata/rapidata_client/filter/models/gender.py,sha256=oG2AgpRasK1YYkEivFzccjaifWmfCW61Um4APvaWV1g,621
|
|
651
651
|
rapidata/rapidata_client/filter/new_user_filter.py,sha256=HT0gXct1j2_0AdbSn-9DhrwWtLSGLECWNGZKQCoglFM,344
|
|
652
|
-
rapidata/rapidata_client/filter/not_filter.py,sha256=
|
|
653
|
-
rapidata/rapidata_client/filter/or_filter.py,sha256=
|
|
652
|
+
rapidata/rapidata_client/filter/not_filter.py,sha256=BfGx3db9tRGrNj6YHXK8tiyVXazHrhM4C8FoFx36Y2w,1242
|
|
653
|
+
rapidata/rapidata_client/filter/or_filter.py,sha256=IabAoq15IhTGQrse_9_DMGCX-lUV_mx3vN4sM3fypA4,1400
|
|
654
654
|
rapidata/rapidata_client/filter/rapidata_filters.py,sha256=B8ptQsaAn1e14Grv8xBYQ4qcU0Vt2VTjEpkk-tyOCTo,2201
|
|
655
|
-
rapidata/rapidata_client/filter/response_count_filter.py,sha256=
|
|
656
|
-
rapidata/rapidata_client/filter/user_score_filter.py,sha256=
|
|
655
|
+
rapidata/rapidata_client/filter/response_count_filter.py,sha256=5vxBWh7VUarIIkfZRscPCDhqOptvar-2GOvbKmiJ6Y8,2199
|
|
656
|
+
rapidata/rapidata_client/filter/user_score_filter.py,sha256=hX-8IT03SqyJ48WAgsYH75mXHHfXtrae7pcGIvfeBKU,1905
|
|
657
657
|
rapidata/rapidata_client/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
658
658
|
rapidata/rapidata_client/order/_rapidata_order_builder.py,sha256=FTJJRCW9KehIlqELOXmKeLhuGcLj9m9ImEU1agOIRa4,16915
|
|
659
659
|
rapidata/rapidata_client/order/dataset/_rapidata_dataset.py,sha256=8EhoRVBxWMbp1mtS56Uogg2dwFC2vySw5hNqTPDTHzM,6345
|
|
@@ -715,7 +715,7 @@ rapidata/service/credential_manager.py,sha256=T3yL4tXVnibRytxjQkOC-ex3kFGQR5KcKU
|
|
|
715
715
|
rapidata/service/local_file_service.py,sha256=0Q4LdoEtPFKzgXK2oZ1cQ-X7FipakscjGnnBH8dRFRQ,855
|
|
716
716
|
rapidata/service/openapi_service.py,sha256=E2zVagI_ri15PK06ITO_VNKYDJ0VZQG1YQ1T6bEIVsY,5566
|
|
717
717
|
rapidata/types/__init__.py,sha256=NLRuTGbTImRv3yIp8we_oqVvCuBd7TDNVlAzkVGs9oo,6056
|
|
718
|
-
rapidata-2.42.
|
|
719
|
-
rapidata-2.42.
|
|
720
|
-
rapidata-2.42.
|
|
721
|
-
rapidata-2.42.
|
|
718
|
+
rapidata-2.42.5.dist-info/METADATA,sha256=cvSZF842ZjlBbblCSxm7XuDRhwbp1PLQqji1A6Pf9uY,1479
|
|
719
|
+
rapidata-2.42.5.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
720
|
+
rapidata-2.42.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
721
|
+
rapidata-2.42.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|