iab_tcf.v2 package¶
Submodules¶
iab_tcf.v2.non_core_segments module¶
-
class
iab_tcf.v2.non_core_segments.NonCoreSegment(segment: bytes)[source]¶ Bases:
objectRepresents a non core segment that can contain information regarding disclosed vendors, allowed vendors or publiser tc.
Parameters: segment – The segment to process in bytes. -
ALLOWED_VENDORS= 2¶
-
CORE= 0¶
-
DISCLOSED_VENDORS= 1¶
-
PUBLISHER_TC= 3¶
-
is_allowed_vendors()[source]¶ Checks if the non core segment contains information about Allowed Vendors.
-
is_disclosed_vendors()[source]¶ Checks if the non core segment contains information about Disclosed Vendors.
-
iab_tcf.v2.publisher_restriction module¶
-
class
iab_tcf.v2.publisher_restriction.PubRestrictionEntry(purpose_id: int, restriction_type: str, restrictions_range: List[Tuple[int, int]])[source]¶ Bases:
objectRepresents a publisher restriction entry that can be used to perform several operation on that information.
Parameters: - purpose_id – The purpose this publisher restriction applies to.
- restriction_type – The type this restriction applies to.
- restrictions_range – The range of publishers this restriction applies to.
-
PURPOSE_FLATLY_NOT_ALLOWED= 0¶
-
REQUIRE_CONSENT= 1¶
-
REQUIRE_LEGITIMATE_INTEREST= 2¶
-
UNDEFINED= 3¶
-
is_in_range(publisher: int) → bool[source]¶ Checks if the publisher received is affected by this restriction or not
iab_tcf.v2.publisher_tc module¶
-
class
iab_tcf.v2.publisher_tc.PubTCEntry(purposes_consent: Dict[int, bool], purposes_lit_transparency: Dict[int, bool], custom_purposes_consent: Dict[int, bool], custom_purposes_lit_transparency: Dict[int, bool])[source]¶ Bases:
objectRepresents a Publisher TC entry that can be used to retrieve further information.
Parameters: - purposes_consent – The publisher’s purposes consent.
- purposes_lit_transparency – The publisher’s purposes legitimate interest consents.
- custom_purposes_consent – The publisher’s custom purposes consent.
- custom_purposes_lit_transparency – The publisher’s custom purposes legitimate interest consents.