Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Return NameLoad Assign NameStore NameLoad Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad Assign SubscriptStore NameLoad Index NameLoad ListComp Call NameLoad NameLoad comprehension NameStore NameLoad orelse If CompareGtE Call AttributeLoad NameLoad attr Str Num body Assign SubscriptStore NameLoad Index Str NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad If NameLoad body Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If BoolOpOr CompareGtE Call AttributeLoad NameLoad attr Str Num CompareGtE Call AttributeLoad NameLoad attr Str Num body Assign SubscriptStore NameLoad Index NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index NameLoad NameLoad orelse Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr If BoolOpAnd NameLoad NameLoad body Return BinOpBitAnd NameLoad UnaryOpInvert NameLoad orelse If NameLoad body Return NameLoad orelse If NameLoad body Return UnaryOpInvert NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Return Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return NameLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore Dict If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Dict Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return NameLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore ListLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore Dict If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad decorator_list Assign NameStore Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Dict Str Str Str Str Str Str Str Str Dict Str Str Str Str Str Str Str Str Dict Str Str Str Str Str Str Str Str Dict Str Str Str Str Str Str Str Str Dict Str Str Str Str Str Str Str Str Expr Str FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Dict Str Str ListLoad ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If UnaryOpNot NameLoad body Continue Assign NameStore SubscriptLoad NameLoad Index Str If CompareEq NameLoad Str body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore ListLoad For NameStore SubscriptLoad NameLoad Index NameLoad body Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If SubscriptLoad NameLoad Index Str body AugAssignAdd SubscriptStore NameLoad Index Str NameLoad orelse AugAssignAdd SubscriptStore NameLoad Index Str NameLoad orelse If CompareEq NameLoad Str body For NameStore ListLoad Str Str body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr If BoolOpAnd NameLoad NameLoad body Return BinOpBitAnd NameLoad UnaryOpInvert NameLoad orelse If NameLoad body Return NameLoad orelse If NameLoad body Return UnaryOpInvert NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args defaults Call NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body For NameStore NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Dict Str AttributeLoad NameLoad attr If CompareEq NameLoad Str body Assign NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad attr NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str CompareEq NameLoad Str orelse If CompareEq NameLoad Str body Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad attr NameLoad Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Return NameLoad decorator_list Expr Str FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpOr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpOr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpOr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpOr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad If NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Return Call NameLoad NameLoad NameLoad orelse Assign NameStore ListLoad If Call AttributeLoad NameLoad attr Str body Assign NameStore Str Assign NameStore Str Assign NameStore SubscriptLoad NameLoad Index NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad orelse Assign NameStore Str Assign NameStore Str Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr If CompareEq SubscriptLoad NameLoad Index Str Str body Return NameLoad orelse Return UnaryOpInvert NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Lambda arguments args defaults Call NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index NameLoad attr NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore ListLoad Assign NameStore NameLoad Assign NameStore NameLoad For NameStore NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd UnaryOpNot NameLoad UnaryOpNot NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad If BoolOpOr CompareNotEq NameLoad AttributeLoad NameLoad attr CompareNotEq NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Dict Str Str NameLoad NameLoad NameLoad NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If CompareEq NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Assign TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore Str orelse Assign NameStore Str If Call NameLoad SubscriptLoad NameLoad Index Num NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad orelse If CompareEq Call NameLoad NameLoad Num body Return Call NameLoad SubscriptLoad NameLoad Index Num orelse Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Return Dict Str Str Str Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad keyword Call NameLoad Call AttributeLoad NameLoad attr Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list
N/A N/A  Parselmouth - DFP Targeting Utilities
 __future__ absolute_import __future__ division __future__ print_function __future__ unicode_literals collections defaultdict parselmouth.constants TechnologyTargetTypes parselmouth.exceptions ParselmouthException parselmouth.targeting AdUnit parselmouth.targeting Custom parselmouth.targeting Geography parselmouth.targeting Placement parselmouth.targeting TargetingCriterion parselmouth.targeting TargetingData parselmouth.targeting Technology clean_target_dict N/A N/A data N/A N/A N/A 
    There are many unimplemented fields throughout parselmouth,
    for example some types of targeting are not yet implemented.
    In these cases, we must clean the dictionary before we pass
    it back to DFP. Fields like X.Type exist in many places, and these
    must be replaced with 'xsi_type' for exaample. Also, unneeded fields
    sometimes raise errors when passed back to DFP.

    @param data: dict
    @return: dict
     N/A N/A N/A isinstance data dict N/A N/A data N/A at_bottom True N/A cln_dict N/A N/A N/A _key _val N/A N/A data items N/A N/A N/A isinstance _val dict N/A N/A at_bottom False N/A N/A cln_dict N/A _key N/A clean_target_dict _val N/A N/A N/A isinstance _val list N/A N/A at_bottom False N/A N/A cln_dict N/A _key N/A N/A clean_target_dict d N/A d _val N/A N/A N/A N/A N/A _key find _Type 0 N/A N/A N/A cln_dict N/A xsi_type _val N/A N/A N/A cln_dict N/A _key _val N/A at_bottom N/A N/A clean_dict N/A N/A N/A _key _val N/A N/A cln_dict items N/A N/A N/A N/A N/A N/A _key find id 0 N/A N/A N/A _key find Id 0 N/A N/A N/A clean_dict N/A _key _val N/A N/A N/A _key xsi_type N/A N/A N/A clean_dict N/A _key _val N/A N/A clean_dict cln_dict N/A clean_dict N/A _make_criterion_from_lists N/A N/A includes excludes N/A N/A N/A 
    Give a list of items to include and exclude,
    construct the corresponding TargetingCriterion

    @param includes: list
    @param excludes: list
    @return: TargetingCriterion|None
     N/A incl N/A TargetingCriterion includes N/A N/A TargetingCriterion OPERATOR OR N/A excl N/A TargetingCriterion excludes N/A N/A TargetingCriterion OPERATOR OR N/A N/A includes excludes N/A N/A N/A incl N/A excl N/A N/A includes N/A N/A incl N/A N/A excludes N/A N/A N/A excl N/A N/A None N/A _adunit_from_dfp N/A N/A adunit N/A N/A N/A 
    Convert dfp dictionary to AdUnit targeting model

    @param adunit: dict
    @return: AdUnit
     N/A include_descendants N/A N/A adunit get includeDescendants False N/A N/A AdUnit id N/A adunit N/A adUnitId include_descendants include_descendants N/A _adunit_to_dfp N/A N/A adunit N/A N/A N/A 
    Convert AdUnit targeting model to dfp dictionary

    @param adunit: AdUnit
    @return: dict
     N/A N/A adUnitId includeDescendants N/A adunit id N/A adunit include_descendants N/A transform_inventory_targeting_from_dfp N/A N/A targeting N/A N/A N/A 
    Convert dfp dictionary to inventory targeting model

    @param targeting: dict
    @return: TargetingCriterion
     N/A N/A targeting N/A N/A None N/A include_list N/A N/A placement_ids N/A N/A targeting get targetedPlacementIds N/A N/A pl_id placement_ids N/A N/A place N/A Placement id pl_id N/A N/A N/A include_list append place N/A ad_units N/A N/A targeting get targetedAdUnits N/A N/A au ad_units N/A N/A N/A N/A include_list append N/A _adunit_from_dfp au N/A exclude_list N/A N/A ad_units N/A N/A targeting get excludedAdUnits N/A N/A au ad_units N/A N/A N/A N/A exclude_list append N/A _adunit_from_dfp au N/A N/A _make_criterion_from_lists include_list exclude_list N/A transform_inventory_targeting_to_dfp N/A N/A targeting N/A N/A N/A 
    Convert inventory targeting model to dfp dictionary

    @param adunit: TargetingCriterion
    @return: dict
     N/A targeted_placements N/A N/A targeted_adunits N/A N/A excluded_adunits N/A N/A N/A includes excludes N/A N/A targeting get_includes_and_excludes N/A i includes N/A N/A N/A isinstance i AdUnit N/A N/A N/A N/A targeted_adunits append N/A _adunit_to_dfp i N/A N/A N/A isinstance i Placement N/A N/A N/A N/A targeted_placements append N/A i id N/A e excludes N/A N/A N/A isinstance e AdUnit N/A N/A N/A N/A excluded_adunits append N/A _adunit_to_dfp e N/A target_dict N/A N/A targeted_placements N/A N/A N/A target_dict N/A targetedPlacementIds targeted_placements N/A targeted_adunits N/A N/A N/A target_dict N/A targetedAdUnits targeted_adunits N/A excluded_adunits N/A N/A N/A target_dict N/A excludedAdUnits excluded_adunits N/A target_dict N/A _geo_from_dfp N/A N/A geo N/A N/A N/A 
    Convert dfp dictionary to Geography targeting model

    @param adunit: dict
    @return: Geography
     N/A N/A Geography id N/A geo N/A id type N/A geo N/A type name N/A geo N/A displayName N/A _geo_to_dfp N/A N/A geo N/A N/A N/A 
    Convert Geography targeting model to dfp dictionary

    @param adunit: Geography
    @return: dict
     N/A N/A type displayName id N/A geo type N/A geo name N/A geo id N/A transform_geography_targeting_from_dfp N/A N/A targeting N/A N/A N/A 
    Convert dfp dictionary to geography targeting model

    @param targeting: dict
    @return: TargetingCriterion
     N/A N/A targeting N/A N/A None N/A exclude_list N/A N/A excluded N/A N/A targeting get excludedLocations N/A N/A g excluded N/A N/A N/A N/A exclude_list append N/A _geo_from_dfp g N/A include_list N/A N/A included N/A N/A targeting get targetedLocations N/A N/A g included N/A N/A N/A N/A include_list append N/A _geo_from_dfp g N/A N/A _make_criterion_from_lists include_list exclude_list N/A transform_geography_targeting_to_dfp N/A N/A targeting N/A N/A N/A 
    Convert geography targeting model to dfp dictionary

    @param adunit: TargetingCriterion
    @return: dict
     N/A included_locations N/A N/A excluded_locations N/A N/A N/A includes excludes N/A N/A targeting get_includes_and_excludes N/A i includes N/A N/A N/A isinstance i Geography N/A N/A N/A N/A included_locations append N/A _geo_to_dfp i N/A e excludes N/A N/A N/A isinstance e Geography N/A N/A N/A N/A excluded_locations append N/A _geo_to_dfp e N/A target_dict N/A N/A included_locations N/A N/A N/A target_dict N/A targetedLocations included_locations N/A excluded_locations N/A N/A N/A target_dict N/A excludedLocations excluded_locations N/A target_dict N/A N/A TECHNOLOGY_KEY_MAP N/A N/A TechnologyTargetTypes bandwidth_group N/A TechnologyTargetTypes browser N/A TechnologyTargetTypes browser_language N/A TechnologyTargetTypes device_manufacturer N/A TechnologyTargetTypes mobile_carrier N/A TechnologyTargetTypes operating_system N/A TechnologyTargetTypes device_capability N/A TechnologyTargetTypes device_category N/A TechnologyTargetTypes mobile_device N/A TechnologyTargetTypes mobile_device_submodel N/A TechnologyTargetTypes operating_system_version N/A target_name type list_name BandwidthGroupTargeting list bandwidthGroups N/A target_name type list_name browserTargeting list browsers N/A target_name type list_name browserLanguageTargeting list browserLanguages N/A target_name type list_name DeviceManufacturerTargeting list deviceManufacturers N/A target_name type list_name MobileCarrierTargeting list mobileCarriers N/A target_name type list_name OperatingSystemTargeting list operatingSystems N/A target_name type include exclude DeviceCapabilityTargeting categorical targetedDeviceCapabilities excludedDeviceCapabilities N/A target_name type include exclude deviceCategoryTargeting categorical targetedDeviceCategories excludedDeviceCategories N/A target_name type include exclude MobileDeviceTargeting categorical targetedMobileDevices excludedMobileDevices N/A target_name type include exclude MobileDeviceSubmodelTargeting categorical targetedMobileDeviceSubmodels excludedMobileDeviceSubmodels N/A target_name type include exclude OperatingSystemVersionTargeting categorical targetedOperatingSystemVersions excludedOperatingSystemVersions N/A 
dict, The way DFP handles technology targeting information
    is completely insane. This dictionary tells us how technology
    data must be handled for DFP to understand it properly.
    There are two different format types:
        1) list: A single list of ids is given, and a field
            isTargeted: True|False determines whether this list
            is targeted or not.
        2) categorical: Two lists of included/excluded ids
            are given.

    This dictionary also contains all the key names needed by DFP.
    For some reason they like to pluralize words in proper English
    in a way that cannot be easily automated.

    See: https://developers.google.com/doubleclick-publishers/docs/reference/v201408/ProposalLineItemService.TechnologyTargeting
 transform_technology_targeting_from_dfp N/A N/A targeting N/A N/A N/A 
    Convert DFP technology targeting data to TargetingCriterion

    @param targeting: dict
    @return: TargetingCriterion
     N/A N/A targeting N/A N/A None N/A target_data N/A include exclude N/A N/A N/A N/A tech_type _map N/A N/A TECHNOLOGY_KEY_MAP items N/A N/A target N/A N/A targeting get N/A _map N/A target_name N/A N/A target N/A N/A N/A _map_type N/A _map N/A type N/A N/A _map_type list N/A N/A _list_name N/A _map N/A list_name N/A browser_list N/A N/A item N/A target N/A _list_name N/A N/A tech_target N/A Technology id N/A item N/A id name N/A N/A item get name type tech_type N/A N/A N/A browser_list append tech_target N/A N/A target N/A isTargeted N/A N/A N/A target_data N/A include browser_list N/A N/A N/A target_data N/A exclude browser_list N/A N/A N/A _map_type categorical N/A N/A _cat_key N/A include exclude N/A N/A dfp_key N/A _map N/A _cat_key N/A raw_data N/A N/A target get dfp_key N/A N/A item raw_data N/A N/A tech_target N/A Technology id N/A item N/A id name N/A N/A item get name type tech_type N/A N/A N/A N/A target_data N/A _cat_key append tech_target N/A includes N/A target_data N/A include N/A inc N/A TargetingCriterion includes N/A N/A TargetingCriterion OPERATOR OR N/A excludes N/A target_data N/A exclude N/A exl N/A TargetingCriterion excludes N/A N/A TargetingCriterion OPERATOR OR N/A N/A includes excludes N/A N/A N/A inc N/A exl N/A N/A includes N/A N/A inc N/A N/A excludes N/A N/A N/A exl N/A N/A None N/A transform_technology_targeting_to_dfp N/A N/A targeting N/A N/A N/A 
    Convert TargetingCriterion to DFP technology targeting data
    in dictionary form.

    @param targeting: TargetingCriterion
    @return: dict
     N/A N/A includes excludes N/A N/A targeting get_includes_and_excludes N/A targeting_data N/A include exclude includes excludes N/A dict_info N/A defaultdict N/A N/A N/A N/A N/A defaultdict list N/A N/A criterion_type criterion N/A N/A targeting_data iteritems N/A N/A item criterion N/A N/A tech_type N/A item type N/A _map N/A TECHNOLOGY_KEY_MAP N/A tech_type N/A _map_type N/A _map N/A type N/A _target_name N/A _map N/A target_name N/A dfp_doc N/A id N/A item id N/A N/A _map_type list N/A N/A _list_name N/A _map N/A list_name N/A N/A N/A N/A N/A dict_info N/A _target_name N/A _list_name append dfp_doc N/A N/A N/A dict_info N/A _target_name N/A isTargeted N/A criterion_type include N/A N/A N/A _map_type categorical N/A N/A _category_name N/A _map N/A criterion_type N/A N/A N/A N/A N/A dict_info N/A _target_name N/A _category_name append dfp_doc N/A dfp_dict N/A N/A N/A _key _val N/A N/A dict_info items N/A N/A N/A dfp_dict N/A _key N/A dict _val N/A dfp_dict N/A N/A 
The following targeting utils are unimplemented at this time.
If any of these fields need to be used within python,
these methods will need to be implemented.  For now, dictionaries
of native DFP structure will be stored into these targeting
fields to ensure that the data is not lost.
 transform_user_domain_targeting_from_dfp N/A N/A targeting N/A N/A N/A N/A clean_target_dict targeting N/A transform_user_domain_targeting_to_dfp N/A N/A targeting N/A N/A N/A N/A targeting None N/A transform_day_part_targeting_from_dfp N/A N/A targeting N/A N/A N/A N/A clean_target_dict targeting N/A transform_day_part_targeting_to_dfp N/A N/A targeting N/A N/A N/A N/A targeting None N/A transform_video_content_targeting_from_dfp N/A N/A targeting N/A N/A N/A N/A clean_target_dict targeting N/A transform_video_content_targeting_to_dfp N/A N/A targeting N/A N/A N/A N/A targeting None N/A transform_video_position_targeting_from_dfp N/A N/A targeting N/A N/A N/A N/A clean_target_dict targeting N/A transform_video_position_targeting_to_dfp N/A N/A targeting N/A N/A N/A N/A targeting None N/A _recursive_custom_from_dfp N/A N/A data N/A N/A N/A 
    Convert dfp dictionary to custom targeting model

    @param targeting: dict
    @return: TargetingCriterion
     N/A children N/A N/A data get children N/A N/A children N/A N/A operator N/A data N/A logicalOperator N/A target_list N/A N/A _recursive_custom_from_dfp c N/A c children N/A N/A TargetingCriterion target_list operator N/A N/A values N/A N/A N/A N/A data get audienceSegmentIds N/A N/A node_key AudienceSegmentCriteria N/A _id_key audienceSegmentIds N/A value_ids N/A data N/A _id_key N/A vid value_ids N/A N/A N/A N/A values append N/A Custom id vid id_key _id_key node_key node_key N/A N/A node_key CustomCriteria N/A _id_key valueIds N/A value_ids N/A data N/A _id_key N/A key_id N/A data N/A keyId N/A vid value_ids N/A N/A N/A N/A values append N/A Custom id vid id_key _id_key parent_id key_id node_key node_key N/A targeting N/A TargetingCriterion values N/A N/A TargetingCriterion OPERATOR OR N/A N/A N/A data N/A operator IS N/A N/A targeting N/A N/A N/A targeting N/A transform_custom_targeting_from_dfp N/A N/A targeting N/A N/A N/A 
    Convert dfp dictionary to custom targeting model

    @param targeting: dict
    @return: TargetingCriterion
     N/A N/A targeting N/A N/A None N/A N/A _recursive_custom_from_dfp targeting N/A _custom_target_list_to_child_list N/A N/A custom_targets is_operator N/A N/A N/A 
    Convert a list of custom targets to a list of dictionaries
    formatted for use in DFP

    @param custom_targets: list(Custom)
    @param is_operator: str, 'IS' or 'IS_NOT'
    @return: list(dict)
     N/A _children N/A defaultdict N/A N/A N/A N/A N/A defaultdict list N/A value custom_targets N/A N/A N/A N/A N/A N/A _children N/A N/A value parent_id N/A is_operator append value N/A dfp_children N/A N/A N/A _parent_id _operations N/A N/A _children iteritems N/A N/A N/A _operator _values N/A N/A _operations iteritems N/A N/A _value_target_ids N/A N/A _node_type None N/A _node_value_type None N/A _custom_value _values N/A N/A _this_node_type N/A _custom_value node_key N/A _this_node_value_type N/A _custom_value id_key N/A N/A N/A _node_type N/A _node_value_type N/A N/A _node_type _this_node_type N/A _node_value_type _this_node_value_type N/A N/A N/A _this_node_type N/A _custom_value node_key N/A _this_node_value_type N/A _custom_value id_key N/A N/A N/A ParselmouthException N/A Could not serialize Custom Target: %s _custom_value N/A N/A N/A _value_target_ids append N/A _custom_value id N/A _doc N/A operator xsi_type _node_value_type _operator _node_type _value_target_ids N/A _parent_id N/A N/A N/A _doc N/A keyId _parent_id N/A N/A N/A dfp_children append _doc N/A dfp_children N/A _recursive_custom_to_dfp N/A N/A targeting N/A N/A N/A 
    Convert custom targeting model to dfp dictionary

    @param targeting: TargetingCriterion
    @return: dict
     N/A N/A operator targets N/A N/A targeting get_data N/A N/A operator N/A N/A TargetingCriterion OPERATOR NOT N/A N/A N/A operator targets N/A N/A N/A targets N/A 0 get_data N/A is_operator IS_NOT N/A N/A is_operator IS N/A N/A isinstance N/A targets N/A 0 Custom N/A N/A children N/A _custom_target_list_to_child_list targets is_operator N/A N/A N/A N/A len targets 1 N/A N/A N/A _recursive_custom_to_dfp N/A targets N/A 0 N/A N/A children N/A N/A _recursive_custom_to_dfp c N/A c targets N/A N/A xsi_type children logicalOperator CustomCriteriaSet children operator N/A transform_custom_targeting_to_dfp N/A N/A targeting N/A N/A N/A 
    Convert custom targeting model to dfp dictionary

    @param targeting: TargetingCriterion
    @return: dict
     N/A N/A targeting N/A N/A None N/A N/A _recursive_custom_to_dfp targeting N/A transform_targeting_data_from_dfp N/A N/A targeting N/A N/A N/A 
    Convert dictionary-representation for a SUDS creative object into a
    Parselmouth representation of a Creative

    @param targeting: dict, dictionary-representation of a DFP SUDS response
        for a single creative
    @return: parselmouth.delivery.TargetingData
     N/A N/A TargetingData inventory N/A transform_inventory_targeting_from_dfp N/A N/A targeting get inventoryTargeting geography N/A transform_geography_targeting_from_dfp N/A N/A targeting get geoTargeting day_part N/A transform_day_part_targeting_from_dfp N/A N/A targeting get dayPartTargeting user_domain N/A transform_user_domain_targeting_from_dfp N/A N/A targeting get userDomainTargeting technology N/A transform_technology_targeting_from_dfp N/A N/A targeting get technologyTargeting video_content N/A transform_video_content_targeting_from_dfp N/A N/A targeting get contentTargeting video_position N/A transform_video_position_targeting_from_dfp N/A N/A targeting get videoPositionTargeting custom N/A transform_custom_targeting_from_dfp N/A N/A targeting get customTargeting N/A transform_targeting_data_to_dfp N/A N/A targeting N/A N/A N/A 
    Convert dictionary-representation for a SUDS creative object into a
    Parselmouth representation of a Creative

    @param targeting: dict, dictionary-representation of a DFP SUDS response
        for a single creative
    @return: parselmouth.delivery.TargetingData
     N/A dfp_targeting N/A N/A N/A targeting inventory N/A N/A N/A dfp_targeting N/A inventoryTargeting N/A transform_inventory_targeting_to_dfp N/A targeting inventory N/A N/A targeting geography N/A N/A N/A dfp_targeting N/A geoTargeting N/A transform_geography_targeting_to_dfp N/A targeting geography N/A N/A targeting day_part N/A N/A N/A dfp_targeting N/A dayPartTargeting N/A transform_day_part_targeting_to_dfp N/A targeting day_part N/A N/A targeting technology N/A N/A N/A dfp_targeting N/A technologyTargeting N/A transform_technology_targeting_to_dfp N/A targeting technology N/A N/A targeting video_content N/A N/A N/A dfp_targeting N/A contentTargeting N/A transform_video_content_targeting_to_dfp N/A targeting video_content N/A N/A targeting video_position N/A N/A N/A dfp_targeting N/A videoPositionTargeting N/A transform_video_position_targeting_to_dfp N/A targeting video_position N/A N/A targeting custom N/A N/A N/A dfp_targeting N/A customTargeting N/A transform_custom_targeting_to_dfp N/A targeting custom N/A dfp_targeting N/A