kameleoon-client-python 3.9.0__tar.gz → 3.11.0__tar.gz
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.
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/PKG-INFO +1 -1
- kameleoon-client-python-3.11.0/kameleoon/data/cbscores.py +66 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/conversion.py +34 -2
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/custom_data.py +1 -7
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/data.py +1 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/manager/visitor.py +14 -0
- kameleoon-client-python-3.11.0/kameleoon/helpers/domain.py +83 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/helpers/string_utils.py +5 -4
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/kameleoon_client.py +345 -104
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/kameleoon_client_config.py +40 -14
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/remote_data/remote_visitor_data.py +26 -5
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/network_manager_factory.py +1 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/network_manager_factory_impl.py +5 -2
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/query_builder.py +4 -2
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/services/service_impl.py +24 -6
- kameleoon-client-python-3.11.0/kameleoon/network/url_provider.py +140 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/sdk_version.py +2 -2
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/types/remote_visitor_data_filter.py +16 -7
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon_client_python.egg-info/PKG-INFO +1 -1
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon_client_python.egg-info/SOURCES.txt +1 -0
- kameleoon-client-python-3.9.0/kameleoon/helpers/domain.py +0 -45
- kameleoon-client-python-3.9.0/kameleoon/network/url_provider.py +0 -115
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/MANIFEST.in +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/README.md +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/client_readiness/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/client_readiness/async_readiness.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/client_readiness/threading_readiness.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/custom_data_info.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/data_file.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/experiment.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/feature_flag.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/me_group.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/rule.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/rule_type.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/settings.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/variable.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/variation.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/configuration/variation_by_exposition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/browser.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/cookie.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/device.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/geolocation.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/kcs_heat.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/manager/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/manager/assigned_variation.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/manager/forced_experiment_variation.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/manager/forced_feature_variation.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/manager/forced_variation.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/manager/page_view_visit.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/manager/visitor_manager.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/manager/visitor_slot.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/mapping_identifier.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/operating_system.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/page_view.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/unique_identifier.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/user_agent.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/visitor_visits.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/defaults.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/exceptions.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/helpers/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/helpers/functions.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/helpers/hasher.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/helpers/logger.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/helpers/multi_threading.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/helpers/nonce.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/helpers/repeat_timer.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/helpers/scheduler.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/helpers/visitor_code.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/hybrid/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/hybrid/hybrid_manager.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/hybrid/hybrid_manager_impl.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/kameleoon_client_factory.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/logging/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/logging/kameleoon_logger.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/logging/log_level.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/logging/logger.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/asyncexec/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/asyncexec/async_executor.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/data/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/data/data_manager.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/evaluation/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/evaluation/evaluated_experiment.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/remote_data/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/remote_data/remote_data_manager.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/tracking/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/tracking/tracking_builder.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/tracking/tracking_manager.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/tracking/visitor_tracking_registry.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/warehouse/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/managers/warehouse/warehouse_manager.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/middleware.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/access_token_source.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/access_token_source_factory.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/activity_event.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/cookie/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/cookie/cookie_manager.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/net_provider.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/net_provider_impl.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/network_manager.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/network_manager_impl.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/query_encodable.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/sendable.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/service_initialize_context.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/service_initialize_context_impl.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/services/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/services/automation_service.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/services/automation_service_impl.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/services/configuration_service.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/services/configuration_service_impl.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/services/data_service.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/services/data_service_impl.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/services/service.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/network/uri_helper.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/real_time/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/real_time/real_time_configuration_service.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/real_time/real_time_event.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/storage/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/storage/cache.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/storage/cache_factory.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/storage/cache_factory_impl.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/storage/cache_impl.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/browser_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/constants.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/conversion_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/cookie_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/custom_datum.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/device_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/exclusive_feature_flag_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/geolocation_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/kcs_heat_range_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/number_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/operating_system_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/page_title_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/page_url_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/page_view_number_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/previous_page_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/sdk_language_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/segment_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/string_value_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/target_feature_flag_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/targeting_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/time_elapsed_since_visit_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/unknown_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/visit_number_today_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/visit_number_total_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/visitor_code_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/conditions/visitor_new_return_condition.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/models.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/targeting_manager.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/tree_builder.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/targeting/tree_condition_factory.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/types/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/types/variable.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/types/variation.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon_client_python.egg-info/dependency_links.txt +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon_client_python.egg-info/requires.txt +14 -14
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon_client_python.egg-info/top_level.txt +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/setup.cfg +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/setup.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/kameleoon_app/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/kameleoon_app/admin.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/kameleoon_app/apps.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/kameleoon_app/migrations/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/kameleoon_app/models.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/kameleoon_app/tests.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/kameleoon_app/views.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/manage.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/proj/__init__.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/proj/asgi.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/proj/settings.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/proj/urls.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/integration/proj/proj/wsgi.py +0 -0
- {kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/tests/resources/config.yml +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""CBScores"""
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Iterable, List
|
|
4
|
+
from kameleoon.helpers.string_utils import StringUtils
|
|
5
|
+
from kameleoon.data import DataType
|
|
6
|
+
from kameleoon.data.data import BaseData
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# pylint: disable=R0903
|
|
10
|
+
class ScoredVarId:
|
|
11
|
+
"""ScoredVarId"""
|
|
12
|
+
def __init__(self, variation_id: int, score: float) -> None:
|
|
13
|
+
self.variation_id = variation_id
|
|
14
|
+
self.score = score
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class VarGroup:
|
|
18
|
+
"""VarGroup"""
|
|
19
|
+
def __init__(self, ids: List[int]) -> None:
|
|
20
|
+
ids.sort()
|
|
21
|
+
self.__ids = ids
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def ids(self) -> List[int]:
|
|
25
|
+
"""Returns the IDs"""
|
|
26
|
+
return self.__ids
|
|
27
|
+
|
|
28
|
+
def __str__(self) -> str:
|
|
29
|
+
return f"VarGroup{{ids:{self.__ids}}}"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class CBScores(BaseData):
|
|
33
|
+
"""CBScores"""
|
|
34
|
+
|
|
35
|
+
def __init__(self, cbs_map: Dict[int, Iterable[ScoredVarId]]) -> None:
|
|
36
|
+
super().__init__()
|
|
37
|
+
self.__values = {cbs_key: self.__extract_var_ids(cbs_value) for cbs_key, cbs_value in cbs_map.items()}
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def values(self) -> Dict[int, List[VarGroup]]:
|
|
41
|
+
"""
|
|
42
|
+
Returns the CB variation groups stored by experiment.
|
|
43
|
+
|
|
44
|
+
keys = experiment IDs / values = list of variation IDs ordered descending
|
|
45
|
+
by score (there may be several variation ids with same score)
|
|
46
|
+
"""
|
|
47
|
+
return self.__values
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def data_type(self) -> DataType:
|
|
51
|
+
return DataType.CBS
|
|
52
|
+
|
|
53
|
+
@staticmethod
|
|
54
|
+
def __extract_var_ids(scores: Iterable[ScoredVarId]) -> List[VarGroup]:
|
|
55
|
+
grouped: Dict[float, List[int]] = {}
|
|
56
|
+
for score in scores:
|
|
57
|
+
glist = grouped.get(score.score)
|
|
58
|
+
if glist:
|
|
59
|
+
glist.append(score.variation_id)
|
|
60
|
+
else:
|
|
61
|
+
grouped[score.score] = [score.variation_id]
|
|
62
|
+
return [VarGroup(grouped[score]) for score in sorted(grouped, reverse=True)]
|
|
63
|
+
|
|
64
|
+
def __str__(self) -> str:
|
|
65
|
+
values = StringUtils.object_to_string(self.__values)
|
|
66
|
+
return f"CBScores{{values:{values}}}"
|
{kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/conversion.py
RENAMED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# pylint: disable=duplicate-code
|
|
2
2
|
"""Conversion data"""
|
|
3
|
+
|
|
4
|
+
import json
|
|
5
|
+
from typing import Optional, Iterable
|
|
6
|
+
from kameleoon.data.custom_data import CustomData
|
|
3
7
|
from kameleoon.data.data import Data, DataType
|
|
8
|
+
from kameleoon.helpers.string_utils import StringUtils
|
|
4
9
|
from kameleoon.network.sendable import DuplicationSafeSendableBase
|
|
5
10
|
from kameleoon.network.query_builder import QueryBuilder, QueryParam, QueryParams
|
|
6
11
|
|
|
@@ -11,7 +16,13 @@ class Conversion(Data, DuplicationSafeSendableBase):
|
|
|
11
16
|
|
|
12
17
|
EVENT_TYPE = "conversion"
|
|
13
18
|
|
|
14
|
-
def __init__(
|
|
19
|
+
def __init__(
|
|
20
|
+
self,
|
|
21
|
+
goal_id: int,
|
|
22
|
+
revenue: float = 0.0,
|
|
23
|
+
negative: bool = False,
|
|
24
|
+
metadata: Optional[Iterable[CustomData]] = None,
|
|
25
|
+
) -> None:
|
|
15
26
|
"""
|
|
16
27
|
:param goal_id: Id of the goal associated to the conversion
|
|
17
28
|
:type goal_id: int
|
|
@@ -19,6 +30,8 @@ class Conversion(Data, DuplicationSafeSendableBase):
|
|
|
19
30
|
:type revenue: float
|
|
20
31
|
:param negative: Optional field - If the revenue is negative. By default it's positive, defaults to False
|
|
21
32
|
:type negative: bool
|
|
33
|
+
:param metadata: Optional field - Metadata of the conversion. `None` by default.
|
|
34
|
+
:type metadata: Optional[Iterable[CustomData]]
|
|
22
35
|
|
|
23
36
|
Example:
|
|
24
37
|
|
|
@@ -31,6 +44,7 @@ class Conversion(Data, DuplicationSafeSendableBase):
|
|
|
31
44
|
self.__goal_id = goal_id
|
|
32
45
|
self.__revenue = revenue
|
|
33
46
|
self.__negative = negative
|
|
47
|
+
self.__metadata = metadata
|
|
34
48
|
|
|
35
49
|
@property
|
|
36
50
|
def goal_id(self) -> int:
|
|
@@ -47,6 +61,11 @@ class Conversion(Data, DuplicationSafeSendableBase):
|
|
|
47
61
|
"""Returns negative flag state"""
|
|
48
62
|
return self.__negative
|
|
49
63
|
|
|
64
|
+
@property
|
|
65
|
+
def metadata(self) -> Optional[Iterable[CustomData]]:
|
|
66
|
+
"""Returns metadata"""
|
|
67
|
+
return self.__metadata
|
|
68
|
+
|
|
50
69
|
@property
|
|
51
70
|
def data_type(self) -> DataType:
|
|
52
71
|
return DataType.CONVERSION
|
|
@@ -60,10 +79,23 @@ class Conversion(Data, DuplicationSafeSendableBase):
|
|
|
60
79
|
QueryParam(QueryParams.REVENUE, str(self.revenue)),
|
|
61
80
|
QueryParam(QueryParams.NEGATIVE, "true" if self.negative else "false"),
|
|
62
81
|
)
|
|
82
|
+
if self.metadata:
|
|
83
|
+
query_builder.append(QueryParam(QueryParams.METADATA, self.__encode_metadata()))
|
|
84
|
+
|
|
85
|
+
def __encode_metadata(self) -> str:
|
|
86
|
+
metadata = {}
|
|
87
|
+
if self.metadata is not None:
|
|
88
|
+
added_indices = set()
|
|
89
|
+
for mcd in self.metadata:
|
|
90
|
+
if isinstance(mcd, CustomData) and (mcd.id not in added_indices):
|
|
91
|
+
metadata[mcd.id] = mcd.values
|
|
92
|
+
added_indices.add(mcd.id)
|
|
93
|
+
return json.dumps(metadata, separators=(",", ":"))
|
|
63
94
|
|
|
64
95
|
def __str__(self):
|
|
65
96
|
return (
|
|
66
97
|
f"Conversion{{goal_id:{self.__goal_id},"
|
|
67
98
|
f"revenue:{self.__revenue},"
|
|
68
|
-
f"negative:{self.__negative}
|
|
99
|
+
f"negative:{self.__negative},"
|
|
100
|
+
f"metadata:{StringUtils.object_to_string(self.__metadata)}}}"
|
|
69
101
|
)
|
{kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/custom_data.py
RENAMED
|
@@ -45,9 +45,6 @@ class CustomData(Data, DuplicationUnsafeSendableBase):
|
|
|
45
45
|
def data_type(self) -> DataType:
|
|
46
46
|
return DataType.CUSTOM_DATA
|
|
47
47
|
|
|
48
|
-
def encode_query(self) -> str:
|
|
49
|
-
return super().encode_query() if len(self.__values) > 0 else ""
|
|
50
|
-
|
|
51
48
|
def _add_query_params(self, query_builder: QueryBuilder) -> None:
|
|
52
49
|
str_values = json.dumps({v: 1 for v in self.__values}, separators=(",", ":"))
|
|
53
50
|
query_builder.extend(
|
|
@@ -58,7 +55,4 @@ class CustomData(Data, DuplicationUnsafeSendableBase):
|
|
|
58
55
|
)
|
|
59
56
|
|
|
60
57
|
def __str__(self):
|
|
61
|
-
return
|
|
62
|
-
f"CustomData{{id:{self.__id},"
|
|
63
|
-
f"values:{self.__values}}}"
|
|
64
|
-
)
|
|
58
|
+
return f"CustomData{{id:{self.__id},values:{self.__values}}}"
|
{kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/data/manager/visitor.py
RENAMED
|
@@ -5,6 +5,7 @@ from typing import Any, Callable, Optional, Dict, List, Iterator, Iterable, cast
|
|
|
5
5
|
from kameleoon.data.visitor_visits import VisitorVisits
|
|
6
6
|
from kameleoon.data.data import Data
|
|
7
7
|
from kameleoon.data.browser import Browser
|
|
8
|
+
from kameleoon.data.cbscores import CBScores
|
|
8
9
|
from kameleoon.data.conversion import Conversion
|
|
9
10
|
from kameleoon.data.cookie import Cookie
|
|
10
11
|
from kameleoon.data.custom_data import CustomData
|
|
@@ -172,6 +173,13 @@ class Visitor: # pylint: disable=R0904
|
|
|
172
173
|
KameleoonLogger.debug('CALL/RETURN: Visitor.kcs_heat -> (kcs_heat: %s)', kcs_heat)
|
|
173
174
|
return kcs_heat
|
|
174
175
|
|
|
176
|
+
@property
|
|
177
|
+
def cbscores(self) -> Optional[CBScores]:
|
|
178
|
+
"""Returns the CBS data associated with this Visitor."""
|
|
179
|
+
cbs = self._data.cbscores
|
|
180
|
+
KameleoonLogger.debug('CALL/RETURN: Visitor.cbscores -> (cbs: %s)', cbs)
|
|
181
|
+
return cbs
|
|
182
|
+
|
|
175
183
|
@property
|
|
176
184
|
def visitor_visits(self) -> Optional[VisitorVisits]:
|
|
177
185
|
"""Returns the visitor visits data associated with this Visitor."""
|
|
@@ -261,6 +269,7 @@ class Visitor: # pylint: disable=R0904
|
|
|
261
269
|
self.forced_variations: Optional[Dict[int, ForcedExperimentVariation]] = None
|
|
262
270
|
self.simulated_variations: Optional[Dict[str, ForcedFeatureVariation]] = None
|
|
263
271
|
self.kcs_heat: Optional[KcsHeat] = None
|
|
272
|
+
self.cbscores: Optional[CBScores] = None
|
|
264
273
|
self.visitor_visits: Optional[VisitorVisits] = None
|
|
265
274
|
self.mapping_identifier: Optional[str] = None
|
|
266
275
|
self.legal_consent = False
|
|
@@ -403,6 +412,10 @@ class Visitor: # pylint: disable=R0904
|
|
|
403
412
|
def _set_kcs_heat(self, context: DataAddingContext) -> None:
|
|
404
413
|
self._data.kcs_heat = cast(KcsHeat, context.data)
|
|
405
414
|
|
|
415
|
+
def _set_cbscores(self, context: DataAddingContext) -> None:
|
|
416
|
+
if context.overwrite or self._data.cbscores is None:
|
|
417
|
+
self._data.cbscores = cast(CBScores, context.data)
|
|
418
|
+
|
|
406
419
|
def _set_visitor_visits(self, context: DataAddingContext) -> None:
|
|
407
420
|
self._data.visitor_visits = cast(VisitorVisits, context.data)
|
|
408
421
|
|
|
@@ -425,6 +438,7 @@ class Visitor: # pylint: disable=R0904
|
|
|
425
438
|
PageViewVisit: _add_page_view_visit,
|
|
426
439
|
Conversion: _add_conversion,
|
|
427
440
|
KcsHeat: _set_kcs_heat,
|
|
441
|
+
CBScores: _set_cbscores,
|
|
428
442
|
VisitorVisits: _set_visitor_visits,
|
|
429
443
|
AssignedVariation: _add_variation,
|
|
430
444
|
ForcedFeatureVariation: _add_forced_feature_variation,
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"""Helper for domain"""
|
|
2
|
+
import re
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from kameleoon.logging.kameleoon_logger import KameleoonLogger
|
|
6
|
+
|
|
7
|
+
HTTP = "http://"
|
|
8
|
+
HTTPS = "https://"
|
|
9
|
+
REGEX_DOMAIN = (
|
|
10
|
+
r"^(\.?(([a-zA-Z\d][a-zA-Z\d-]*[a-zA-Z\d])|[a-zA-Z\d]))"
|
|
11
|
+
r"(\.(([a-zA-Z\d][a-zA-Z\d-]*[a-zA-Z\d])|[a-zA-Z\d])){1,126}$"
|
|
12
|
+
)
|
|
13
|
+
LOCALHOST = "localhost"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def validate_top_level_domain(top_level_domain: str) -> str:
|
|
17
|
+
"""
|
|
18
|
+
Validate the given top-level domain.
|
|
19
|
+
|
|
20
|
+
Args:
|
|
21
|
+
top_level_domain (str): The top-level domain to validate.
|
|
22
|
+
|
|
23
|
+
Returns:
|
|
24
|
+
str: The validated top-level domain.
|
|
25
|
+
"""
|
|
26
|
+
if top_level_domain == "":
|
|
27
|
+
return top_level_domain
|
|
28
|
+
|
|
29
|
+
top_level_domain = check_and_trim_protocol(top_level_domain.lower())
|
|
30
|
+
|
|
31
|
+
if not re.match(REGEX_DOMAIN, top_level_domain) and top_level_domain != LOCALHOST:
|
|
32
|
+
KameleoonLogger.error(
|
|
33
|
+
f"The top-level domain '{top_level_domain}' is invalid. The value has been set as provided, but it does "
|
|
34
|
+
f"not meet the required format for proper SDK functionality. Please check the domain for correctness.")
|
|
35
|
+
return top_level_domain
|
|
36
|
+
|
|
37
|
+
return top_level_domain
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def validate_network_domain(network_domain: Optional[str]) -> Optional[str]:
|
|
41
|
+
"""
|
|
42
|
+
Validate the given network domain.
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
network_domain: The network domain to validate.
|
|
46
|
+
|
|
47
|
+
Returns:
|
|
48
|
+
str or None: The validated network domain, or None if invalid.
|
|
49
|
+
"""
|
|
50
|
+
if not network_domain:
|
|
51
|
+
return None
|
|
52
|
+
|
|
53
|
+
network_domain = check_and_trim_protocol(network_domain.lower())
|
|
54
|
+
|
|
55
|
+
# Replace first and last dot
|
|
56
|
+
network_domain = re.sub(r"^\.+|\.+$", "", network_domain)
|
|
57
|
+
|
|
58
|
+
if not re.match(REGEX_DOMAIN, network_domain) and network_domain != LOCALHOST:
|
|
59
|
+
KameleoonLogger.error(f"The network domain '{network_domain}' is invalid.")
|
|
60
|
+
return None
|
|
61
|
+
|
|
62
|
+
return network_domain
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def check_and_trim_protocol(domain: str) -> str:
|
|
66
|
+
"""
|
|
67
|
+
Check if the domain contains a protocol and trim it if it does.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
domain: The domain to check and trim.
|
|
71
|
+
|
|
72
|
+
Returns:
|
|
73
|
+
str: The domain after trimming the protocol.
|
|
74
|
+
"""
|
|
75
|
+
protocols = [HTTP, HTTPS]
|
|
76
|
+
for protocol in protocols:
|
|
77
|
+
if domain.startswith(protocol):
|
|
78
|
+
domain = domain[len(protocol):]
|
|
79
|
+
KameleoonLogger.warning(
|
|
80
|
+
f"The domain contains '{protocol}'. Domain after protocol trimming: '{domain}'"
|
|
81
|
+
)
|
|
82
|
+
return domain
|
|
83
|
+
return domain
|
{kameleoon-client-python-3.9.0 → kameleoon-client-python-3.11.0}/kameleoon/helpers/string_utils.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Helper class for work with string values"""
|
|
2
2
|
|
|
3
|
+
import collections.abc
|
|
3
4
|
from typing import Any, Optional
|
|
4
5
|
|
|
5
6
|
|
|
@@ -31,6 +32,8 @@ class StringUtils:
|
|
|
31
32
|
@staticmethod
|
|
32
33
|
def object_to_string(data: Any) -> str:
|
|
33
34
|
"""Convert various data types into their string representation."""
|
|
35
|
+
if data is None:
|
|
36
|
+
return "None"
|
|
34
37
|
if isinstance(data, str):
|
|
35
38
|
return f"'{data}'"
|
|
36
39
|
result = StringUtils._collection_to_string(data)
|
|
@@ -38,19 +41,17 @@ class StringUtils:
|
|
|
38
41
|
return result
|
|
39
42
|
if isinstance(data, bool):
|
|
40
43
|
return StringUtils.bool_to_string_lower_case(data)
|
|
41
|
-
if data is None:
|
|
42
|
-
return "None"
|
|
43
44
|
if hasattr(data, '__str__'):
|
|
44
45
|
return str(data)
|
|
45
46
|
return repr(data)
|
|
46
47
|
|
|
47
48
|
@staticmethod
|
|
48
49
|
def _collection_to_string(data: Any) -> Optional[str]:
|
|
49
|
-
if isinstance(data, (list, tuple)):
|
|
50
|
-
return "[" + ",".join(StringUtils.object_to_string(item) for item in data) + "]"
|
|
51
50
|
if isinstance(data, dict):
|
|
52
51
|
return "{" + ",".join(
|
|
53
52
|
f"{StringUtils.object_to_string(key)}: {StringUtils.object_to_string(value)}"
|
|
54
53
|
for key, value in data.items()
|
|
55
54
|
) + "}"
|
|
55
|
+
if isinstance(data, collections.abc.Iterable):
|
|
56
|
+
return "[" + ",".join(StringUtils.object_to_string(item) for item in data) + "]"
|
|
56
57
|
return None
|