kameleoon-client-python 3.23.0__tar.gz → 3.24.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.23.0 → kameleoon_client_python-3.24.0}/PKG-INFO +17 -17
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/streaming/streaming_service.py +7 -1
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/sdk_version.py +1 -1
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/browser_condition.py +4 -11
- kameleoon_client_python-3.24.0/kameleoon/targeting/conditions/constants.py +58 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/cookie_condition.py +4 -7
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/custom_datum.py +38 -30
- kameleoon_client_python-3.24.0/kameleoon/targeting/conditions/number_condition.py +30 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/string_value_condition.py +1 -4
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/version_condition.py +6 -12
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon_client_python.egg-info/PKG-INFO +17 -17
- kameleoon_client_python-3.23.0/kameleoon/targeting/conditions/constants.py +0 -32
- kameleoon_client_python-3.23.0/kameleoon/targeting/conditions/number_condition.py +0 -36
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/MANIFEST.in +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/README.md +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/client_readiness/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/client_readiness/async_readiness.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/client_readiness/threading_readiness.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/config_update_mode.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/consent_blocking_behaviour.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/custom_data_info.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/data_file.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/experiment.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/feature_flag.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/me_group.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/rule.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/rule_type.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/settings.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/variable.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/variation.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/variation_by_exposition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/application_version.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/browser.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/cbscores.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/conversion.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/cookie.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/custom_data.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/data.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/device.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/geolocation.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/kcs_heat.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/assigned_variation.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/forced_experiment_variation.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/forced_feature_variation.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/forced_variation.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/legal_consent.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/page_view_visit.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/visitor.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/visitor_manager.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/visitor_slot.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/mapping_identifier.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/operating_system.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/page_view.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/personalization.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/targeted_segment.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/unique_identifier.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/user_agent.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/visitor_visits.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/defaults.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/data_file_update_event.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/data_file_update_handler.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/event_handler.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/event_manager.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/event_type.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/http_request_failure.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/http_request_handler.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/request_type.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/exceptions.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/domain.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/functions.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/hasher.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/logger.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/multi_threading.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/nonce.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/repeat_timer.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/scheduler.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/sem_version.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/string_utils.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/time.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/helpers/visitor_code.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/hybrid/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/hybrid/hybrid_manager.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/hybrid/hybrid_manager_impl.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/kameleoon_client.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/kameleoon_client_config.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/kameleoon_client_factory.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/logging/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/logging/kameleoon_logger.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/logging/log_level.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/logging/logger.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/asyncexec/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/asyncexec/async_executor.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/data/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/data/data_manager.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/evaluation/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/evaluation/evaluated_experiment.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/remote_data/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/remote_data/remote_data_manager.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/remote_data/remote_visitor_data.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/tracking/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/tracking/tracking_builder.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/tracking/tracking_manager.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/tracking/visitor_tracking_registry.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/warehouse/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/managers/warehouse/warehouse_manager.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/middleware.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/access_token_source.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/access_token_source_factory.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/activity_event.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/cookie/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/cookie/cookie_manager.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/net_provider.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/net_provider_impl.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/network_manager.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/network_manager_factory.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/network_manager_factory_impl.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/network_manager_impl.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/query_builder.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/query_encodable.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/sendable.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/service_initialize_context.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/service_initialize_context_impl.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/services/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/services/automation_service.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/services/automation_service_impl.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/services/configuration_service.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/services/configuration_service_impl.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/services/data_service.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/services/data_service_impl.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/services/service.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/services/service_impl.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/streaming/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/streaming/data_file_update_message.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/uri_helper.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/network/url_provider.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/conversion_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/device_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/exclusive_experiment_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/geolocation_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/kcs_heat_range_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/operating_system_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/page_title_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/page_url_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/page_view_number_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/previous_page_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/sdk_language_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/segment_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/target_experiment_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/target_feature_flag_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/target_personalization_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/targeting_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/time_elapsed_since_visit_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/unknown_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/visit_number_today_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/visit_number_total_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/visitor_code_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/visitor_new_return_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/conditions/visitor_scope_condition.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/models.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/targeting_manager.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/tree_builder.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/targeting/tree_condition_factory.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/types/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/types/data_file.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/types/feature_flag.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/types/remote_visitor_data_filter.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/types/rule.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/types/variable.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/types/variation.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon_client_python.egg-info/SOURCES.txt +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon_client_python.egg-info/dependency_links.txt +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon_client_python.egg-info/requires.txt +16 -16
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon_client_python.egg-info/top_level.txt +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/setup.cfg +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/setup.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/benchmarks/visitor_tracking_registry_benchmark.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/kameleoon_app/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/kameleoon_app/admin.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/kameleoon_app/apps.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/kameleoon_app/migrations/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/kameleoon_app/models.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/kameleoon_app/tests.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/kameleoon_app/views.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/manage.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/proj/__init__.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/proj/asgi.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/proj/settings.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/proj/urls.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/integration/proj/proj/wsgi.py +0 -0
- {kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/tests/resources/config.yml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kameleoon-client-python
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.24.0
|
|
4
4
|
Summary: Kameleoon Client Python Software Development Kit.
|
|
5
5
|
Home-page: https://developers.kameleoon.com/python-sdk.html
|
|
6
6
|
Author: Kameleoon
|
|
@@ -20,27 +20,27 @@ Requires-Dist: requests<3.0.0,>=2.25
|
|
|
20
20
|
Requires-Dist: sseclient-py<1.9.0,>=1.7.0
|
|
21
21
|
Requires-Dist: aiohttp<4.0.0,>=3.8.0
|
|
22
22
|
Provides-Extra: test
|
|
23
|
-
Requires-Dist: types-requests==2.25.0; extra == "test"
|
|
24
|
-
Requires-Dist: mypy==0.991; extra == "test"
|
|
25
|
-
Requires-Dist: Django==4.2.*; extra == "test"
|
|
26
|
-
Requires-Dist: pytest-cov==2.12.1; extra == "test"
|
|
27
|
-
Requires-Dist: types-PyYAML==5.4.3; extra == "test"
|
|
28
|
-
Requires-Dist: aiohttp<4.0.0,>=3.8.0; extra == "test"
|
|
29
|
-
Requires-Dist: pytest-ordering==0.6; extra == "test"
|
|
30
|
-
Requires-Dist: pytest-pythonpath==0.7.3; extra == "test"
|
|
31
|
-
Requires-Dist: aioresponses==0.7.*; extra == "test"
|
|
32
23
|
Requires-Dist: Werkzeug==2.0.1; extra == "test"
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
Requires-Dist: sseclient-py<1.9.0,>=1.7.0; extra == "test"
|
|
35
|
-
Requires-Dist: pytest-asyncio==0.21.*; extra == "test"
|
|
36
|
-
Requires-Dist: pylint==2.12.*; extra == "test"
|
|
37
|
-
Requires-Dist: flake8==4.0.1; extra == "test"
|
|
24
|
+
Requires-Dist: types-PyYAML==5.4.3; extra == "test"
|
|
38
25
|
Requires-Dist: twine==3.4.1; extra == "test"
|
|
39
|
-
Requires-Dist:
|
|
26
|
+
Requires-Dist: flake8==4.0.1; extra == "test"
|
|
27
|
+
Requires-Dist: requests<3.0.0,>=2.25; extra == "test"
|
|
28
|
+
Requires-Dist: wheel==0.36.2; extra == "test"
|
|
29
|
+
Requires-Dist: mypy==0.991; extra == "test"
|
|
40
30
|
Requires-Dist: freezegun==1.1.0; extra == "test"
|
|
41
31
|
Requires-Dist: types-python-dateutil==2.8.2; extra == "test"
|
|
42
|
-
Requires-Dist:
|
|
32
|
+
Requires-Dist: pytest-pythonpath==0.7.3; extra == "test"
|
|
33
|
+
Requires-Dist: pyyaml<6.1.0,>=5.4.0; extra == "test"
|
|
34
|
+
Requires-Dist: types-requests==2.25.0; extra == "test"
|
|
35
|
+
Requires-Dist: pytest-cov==2.12.1; extra == "test"
|
|
36
|
+
Requires-Dist: aioresponses==0.7.*; extra == "test"
|
|
37
|
+
Requires-Dist: pylint==2.12.*; extra == "test"
|
|
38
|
+
Requires-Dist: pytest-ordering==0.6; extra == "test"
|
|
39
|
+
Requires-Dist: Django==4.2.*; extra == "test"
|
|
40
|
+
Requires-Dist: aiohttp<4.0.0,>=3.8.0; extra == "test"
|
|
43
41
|
Requires-Dist: pytest-django==4.5.2; extra == "test"
|
|
42
|
+
Requires-Dist: pytest-asyncio==0.21.*; extra == "test"
|
|
43
|
+
Requires-Dist: sseclient-py<1.9.0,>=1.7.0; extra == "test"
|
|
44
44
|
Dynamic: author
|
|
45
45
|
Dynamic: author-email
|
|
46
46
|
Dynamic: classifier
|
|
@@ -141,8 +141,14 @@ class StreamingService:
|
|
|
141
141
|
def _close_response(self) -> None:
|
|
142
142
|
with self._response_lock:
|
|
143
143
|
response, self._response = self._response, None
|
|
144
|
-
if response is
|
|
144
|
+
if response is None:
|
|
145
|
+
return
|
|
146
|
+
try:
|
|
145
147
|
response.close()
|
|
148
|
+
except Exception as ex: # pylint: disable=W0703
|
|
149
|
+
# The close races with the streaming thread, which releases the same connection once its read
|
|
150
|
+
# ends, so it may fail inside the HTTP library. The connection is released by the other side then.
|
|
151
|
+
KameleoonLogger.debug("SSE connection: %s failed to close the response: %s", self.url, ex)
|
|
146
152
|
|
|
147
153
|
def _handle_message(self, message: Any) -> None:
|
|
148
154
|
KameleoonLogger.debug("Got SSE event: %s", message.event)
|
|
@@ -53,14 +53,7 @@ class BrowserCondition(TargetingCondition):
|
|
|
53
53
|
|
|
54
54
|
browser_version = browser.version or TargetingCondition.NON_EXISTENT_IDENTIFIER
|
|
55
55
|
|
|
56
|
-
if self.__operator
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return browser_version > version_number
|
|
61
|
-
|
|
62
|
-
if self.__operator == TargetingOperator.LOWER:
|
|
63
|
-
return browser_version < version_number
|
|
64
|
-
|
|
65
|
-
KameleoonLogger.error("Unexpected comparing operation for Browser condition: %s", self.__operator)
|
|
66
|
-
return False
|
|
56
|
+
if not self.__operator.is_comparison():
|
|
57
|
+
KameleoonLogger.error("Unexpected comparing operation for Browser condition: %s", self.__operator)
|
|
58
|
+
return False
|
|
59
|
+
return self.__operator.compare(browser_version, version_number)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
""" Constants """
|
|
2
|
+
|
|
3
|
+
import operator
|
|
4
|
+
from enum import Enum
|
|
5
|
+
from typing import Any, Callable, Optional
|
|
6
|
+
|
|
7
|
+
from kameleoon.logging.kameleoon_logger import KameleoonLogger
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TargetingOperator(Enum):
|
|
11
|
+
"""Targeting operator in condition"""
|
|
12
|
+
|
|
13
|
+
_value_: str
|
|
14
|
+
_comparison: Optional[Callable[[Any, Any], bool]]
|
|
15
|
+
|
|
16
|
+
def __new__(cls, value: str, comparison: Optional[Callable[[Any, Any], bool]] = None) -> "TargetingOperator":
|
|
17
|
+
obj = object.__new__(cls)
|
|
18
|
+
obj._value_ = value
|
|
19
|
+
obj._comparison = comparison
|
|
20
|
+
return obj
|
|
21
|
+
|
|
22
|
+
UNDEFINED = "UNDEFINED"
|
|
23
|
+
CONTAINS = "CONTAINS"
|
|
24
|
+
EXACT = "EXACT"
|
|
25
|
+
REGULAR_EXPRESSION = "REGULAR_EXPRESSION"
|
|
26
|
+
# Comparison operators: the function checks `value <operator> condition_value`
|
|
27
|
+
LOWER = ("LOWER", operator.lt)
|
|
28
|
+
EQUAL = ("EQUAL", operator.eq)
|
|
29
|
+
GREATER = ("GREATER", operator.gt)
|
|
30
|
+
LOWER_OR_EQUAL = ("LOWER_OR_EQUAL", operator.le)
|
|
31
|
+
GREATER_OR_EQUAL = ("GREATER_OR_EQUAL", operator.ge)
|
|
32
|
+
TRUE = "TRUE"
|
|
33
|
+
FALSE = "FALSE"
|
|
34
|
+
AMONG_VALUES = "AMONG_VALUES"
|
|
35
|
+
ANY = "ANY"
|
|
36
|
+
UNKNOWN = "UNKNOWN"
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
def from_string(cls, raw: Any) -> "TargetingOperator":
|
|
40
|
+
"""Parse an operator name from the configuration; unparsable values map to UNKNOWN."""
|
|
41
|
+
try:
|
|
42
|
+
return cls[str(raw).upper()]
|
|
43
|
+
except KeyError:
|
|
44
|
+
# Not an error: a configuration may contain an operator which this SDK version does not know.
|
|
45
|
+
# The error is logged by a condition when such an operator is evaluated
|
|
46
|
+
KameleoonLogger.info("Unexpected TargetingOperator: %s", raw)
|
|
47
|
+
return cls.UNKNOWN
|
|
48
|
+
|
|
49
|
+
def is_comparison(self) -> bool:
|
|
50
|
+
"""Return True if the operator compares a value with the condition value."""
|
|
51
|
+
return self._comparison is not None
|
|
52
|
+
|
|
53
|
+
def compare(self, value: Any, condition_value: Any) -> bool:
|
|
54
|
+
"""Check `value <operator> condition_value`.
|
|
55
|
+
|
|
56
|
+
:return: False if the operator is not a comparison one or any of the values is NaN
|
|
57
|
+
"""
|
|
58
|
+
return self._comparison is not None and bool(self._comparison(value, condition_value))
|
|
@@ -12,13 +12,10 @@ class CookieCondition(TargetingCondition):
|
|
|
12
12
|
|
|
13
13
|
def __init__(self, json_condition: Dict[str, Union[str, int, Any]]):
|
|
14
14
|
super().__init__(json_condition)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
self.__value_match_type = TargetingOperator[str(json_condition.get("valueMatchType"))]
|
|
20
|
-
except KeyError as exeception:
|
|
21
|
-
KameleoonLogger.error("%s has wrong JSON structure: %s", self.__class__, exeception)
|
|
15
|
+
self.__condition_name = str(json_condition.get("name", None))
|
|
16
|
+
self.__name_match_type = TargetingOperator.from_string(json_condition.get("nameMatchType"))
|
|
17
|
+
self.__condition_value = str(json_condition.get("value", None))
|
|
18
|
+
self.__value_match_type = TargetingOperator.from_string(json_condition.get("valueMatchType"))
|
|
22
19
|
|
|
23
20
|
def check(self, data: Any) -> bool:
|
|
24
21
|
return isinstance(data, Cookie) and self.__check_values(self.__select_values(data))
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"""CustomData condition"""
|
|
2
|
+
import math
|
|
2
3
|
import re
|
|
3
4
|
import json
|
|
4
|
-
from typing import Any, Union, Dict, Optional
|
|
5
|
+
from typing import Any, Callable, List, Union, Dict, Optional
|
|
5
6
|
from kameleoon.data import CustomData
|
|
6
7
|
from kameleoon.logging.kameleoon_logger import KameleoonLogger
|
|
7
8
|
from kameleoon.targeting.conditions.targeting_condition import TargetingCondition
|
|
@@ -12,30 +13,40 @@ __all__ = [
|
|
|
12
13
|
]
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
def _parse_number(value: Any) -> float:
|
|
17
|
+
try:
|
|
18
|
+
return float(value)
|
|
19
|
+
except (TypeError, ValueError):
|
|
20
|
+
return math.nan
|
|
21
|
+
|
|
22
|
+
|
|
15
23
|
class CustomDatum(TargetingCondition):
|
|
16
24
|
"""CustomDatum represents a Custom Data condition from back-office"""
|
|
17
25
|
|
|
18
26
|
def __init__(self, json_condition: Dict[str, Union[str, Any]]):
|
|
19
27
|
super().__init__(json_condition)
|
|
28
|
+
self.__index = -1
|
|
20
29
|
try:
|
|
21
30
|
str_index = json_condition["customDataIndex"]
|
|
22
31
|
self.__index = int(str_index) if str_index.isnumeric() else -1
|
|
23
|
-
self.__operator = TargetingOperator[json_condition["valueMatchType"]]
|
|
24
32
|
except KeyError as ex:
|
|
25
33
|
KameleoonLogger.error("%s has wrong JSON structure: %s", self.__class__, ex)
|
|
34
|
+
self.__operator = TargetingOperator.from_string(json_condition.get("valueMatchType"))
|
|
26
35
|
self.value = json_condition.get("value", None)
|
|
27
|
-
self.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
self.__among_values: Optional[List[str]] = None # Parsed from value on first use
|
|
37
|
+
self.__op_func: Callable[[CustomData], bool]
|
|
38
|
+
if self.__operator.is_comparison():
|
|
39
|
+
self.__op_func = self.__op_compare_numbers
|
|
40
|
+
else:
|
|
41
|
+
self.__op_func = {
|
|
42
|
+
TargetingOperator.UNDEFINED: self.__op_undefined,
|
|
43
|
+
TargetingOperator.REGULAR_EXPRESSION: self.__op_regular_expression,
|
|
44
|
+
TargetingOperator.CONTAINS: self.__op_contains,
|
|
45
|
+
TargetingOperator.EXACT: self.__op_exact,
|
|
46
|
+
TargetingOperator.TRUE: self.__op_true,
|
|
47
|
+
TargetingOperator.FALSE: self.__op_false,
|
|
48
|
+
TargetingOperator.AMONG_VALUES: self.__op_among_values,
|
|
49
|
+
}.get(self.__operator, self.__op_unexpected)
|
|
39
50
|
|
|
40
51
|
def check(self, data: Any) -> bool: # noqa: C901
|
|
41
52
|
if isinstance(data, dict):
|
|
@@ -55,6 +66,11 @@ class CustomDatum(TargetingCondition):
|
|
|
55
66
|
return False
|
|
56
67
|
|
|
57
68
|
def __op_undefined(self, custom_data: CustomData) -> bool: # pylint: disable=R0201,W0613
|
|
69
|
+
# The custom data is defined, so the condition is not met
|
|
70
|
+
return False
|
|
71
|
+
|
|
72
|
+
def __op_unexpected(self, custom_data: CustomData) -> bool: # pylint: disable=W0613
|
|
73
|
+
KameleoonLogger.error("Unexpected comparing operation for CustomDatum condition: %s", self.__operator)
|
|
58
74
|
return False
|
|
59
75
|
|
|
60
76
|
def __op_regular_expression(self, custom_data: CustomData) -> bool:
|
|
@@ -67,18 +83,9 @@ class CustomDatum(TargetingCondition):
|
|
|
67
83
|
def __op_exact(self, custom_data: CustomData) -> bool:
|
|
68
84
|
return self.value in custom_data.values
|
|
69
85
|
|
|
70
|
-
def
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return any(abs(float(val) - value) < epsilon for val in custom_data.values)
|
|
74
|
-
|
|
75
|
-
def __op_greater(self, custom_data: CustomData) -> bool:
|
|
76
|
-
value = float(self.value)
|
|
77
|
-
return any(float(val) > value for val in custom_data.values)
|
|
78
|
-
|
|
79
|
-
def __op_lower(self, custom_data: CustomData) -> bool:
|
|
80
|
-
value = float(self.value)
|
|
81
|
-
return any(float(val) < value for val in custom_data.values)
|
|
86
|
+
def __op_compare_numbers(self, custom_data: CustomData) -> bool:
|
|
87
|
+
number = _parse_number(self.value)
|
|
88
|
+
return any(self.__operator.compare(_parse_number(val), number) for val in custom_data.values)
|
|
82
89
|
|
|
83
90
|
def __op_true(self, custom_data: CustomData) -> bool: # pylint: disable=R0201
|
|
84
91
|
return "true" in custom_data.values
|
|
@@ -87,7 +94,8 @@ class CustomDatum(TargetingCondition):
|
|
|
87
94
|
return "false" in custom_data.values
|
|
88
95
|
|
|
89
96
|
def __op_among_values(self, custom_data: CustomData) -> bool:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
if self.__among_values is None:
|
|
98
|
+
parse_dict = {False: "false", True: "true"}
|
|
99
|
+
self.__among_values = [parse_dict.get(m, str(m)) for m in json.loads(self.value)]
|
|
100
|
+
among_values = self.__among_values
|
|
101
|
+
return any(val in among_values for val in custom_data.values)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""Number condition"""
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, Union
|
|
4
|
+
|
|
5
|
+
from kameleoon.logging.kameleoon_logger import KameleoonLogger
|
|
6
|
+
from kameleoon.targeting.conditions.constants import TargetingOperator
|
|
7
|
+
from kameleoon.targeting.conditions.targeting_condition import TargetingCondition
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class NumberCondition(TargetingCondition):
|
|
11
|
+
"""Number condition uses in case if you need to target by value numeric"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, json_condition: Dict[str, Union[str, int, Any]], value_key: str):
|
|
14
|
+
super().__init__(json_condition)
|
|
15
|
+
self._match_type = TargetingOperator.from_string(json_condition.get("matchType"))
|
|
16
|
+
self._condition_value = json_condition.get(value_key)
|
|
17
|
+
|
|
18
|
+
def check(self, data: Any) -> bool:
|
|
19
|
+
return self._check_targeting(data)
|
|
20
|
+
|
|
21
|
+
def _check_targeting(self, value: Any) -> bool:
|
|
22
|
+
if not self._match_type.is_comparison():
|
|
23
|
+
KameleoonLogger.error(
|
|
24
|
+
"Unexpected comparing operation for %s condition: %s",
|
|
25
|
+
self.__class__,
|
|
26
|
+
self._match_type,
|
|
27
|
+
)
|
|
28
|
+
return False
|
|
29
|
+
# A condition without a value never matches
|
|
30
|
+
return self._condition_value is not None and self._match_type.compare(value, self._condition_value)
|
|
@@ -17,10 +17,7 @@ class StringValueCondition(TargetingCondition):
|
|
|
17
17
|
def __init__(self, json_condition: Dict[str, Union[str, int, Any]], value: Optional[str]):
|
|
18
18
|
super().__init__(json_condition)
|
|
19
19
|
self._condition_value = value
|
|
20
|
-
|
|
21
|
-
self._operator = TargetingOperator[str(json_condition["matchType"])]
|
|
22
|
-
except KeyError as ex:
|
|
23
|
-
KameleoonLogger.error("Unknown operation for %s condition, error: %s", self.type, ex)
|
|
20
|
+
self._operator = TargetingOperator.from_string(json_condition.get("matchType"))
|
|
24
21
|
|
|
25
22
|
def check(self, data: Any) -> bool:
|
|
26
23
|
return isinstance(data, str) and self._check(data)
|
|
@@ -13,7 +13,7 @@ class VersionCondition(TargetingCondition):
|
|
|
13
13
|
"""VersionCondition is used for targeting by application version.
|
|
14
14
|
|
|
15
15
|
Compares the visitor's application version against a configured version
|
|
16
|
-
using semantic versioning comparison (EQUAL, GREATER, LOWER).
|
|
16
|
+
using semantic versioning comparison (EQUAL, GREATER, LOWER, GREATER_OR_EQUAL, LOWER_OR_EQUAL).
|
|
17
17
|
"""
|
|
18
18
|
|
|
19
19
|
def __init__(self, json_condition: Dict[str, Union[str, int, Any]]):
|
|
@@ -49,14 +49,8 @@ class VersionCondition(TargetingCondition):
|
|
|
49
49
|
)
|
|
50
50
|
return False
|
|
51
51
|
|
|
52
|
-
if self.__operator
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if self.__operator == TargetingOperator.LOWER:
|
|
59
|
-
return self.__cached_sem_version.compare_to(version_compare) > 0
|
|
60
|
-
|
|
61
|
-
KameleoonLogger.error("Unexpected comparing operation for VersionCondition: %s", self.__operator)
|
|
62
|
-
return False
|
|
52
|
+
if not self.__operator.is_comparison():
|
|
53
|
+
KameleoonLogger.error("Unexpected comparing operation for VersionCondition: %s", self.__operator)
|
|
54
|
+
return False
|
|
55
|
+
# The sign of comparing the versions is compared with zero
|
|
56
|
+
return self.__operator.compare(version_compare.compare_to(self.__cached_sem_version), 0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kameleoon-client-python
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.24.0
|
|
4
4
|
Summary: Kameleoon Client Python Software Development Kit.
|
|
5
5
|
Home-page: https://developers.kameleoon.com/python-sdk.html
|
|
6
6
|
Author: Kameleoon
|
|
@@ -20,27 +20,27 @@ Requires-Dist: requests<3.0.0,>=2.25
|
|
|
20
20
|
Requires-Dist: sseclient-py<1.9.0,>=1.7.0
|
|
21
21
|
Requires-Dist: aiohttp<4.0.0,>=3.8.0
|
|
22
22
|
Provides-Extra: test
|
|
23
|
-
Requires-Dist: types-requests==2.25.0; extra == "test"
|
|
24
|
-
Requires-Dist: mypy==0.991; extra == "test"
|
|
25
|
-
Requires-Dist: Django==4.2.*; extra == "test"
|
|
26
|
-
Requires-Dist: pytest-cov==2.12.1; extra == "test"
|
|
27
|
-
Requires-Dist: types-PyYAML==5.4.3; extra == "test"
|
|
28
|
-
Requires-Dist: aiohttp<4.0.0,>=3.8.0; extra == "test"
|
|
29
|
-
Requires-Dist: pytest-ordering==0.6; extra == "test"
|
|
30
|
-
Requires-Dist: pytest-pythonpath==0.7.3; extra == "test"
|
|
31
|
-
Requires-Dist: aioresponses==0.7.*; extra == "test"
|
|
32
23
|
Requires-Dist: Werkzeug==2.0.1; extra == "test"
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
Requires-Dist: sseclient-py<1.9.0,>=1.7.0; extra == "test"
|
|
35
|
-
Requires-Dist: pytest-asyncio==0.21.*; extra == "test"
|
|
36
|
-
Requires-Dist: pylint==2.12.*; extra == "test"
|
|
37
|
-
Requires-Dist: flake8==4.0.1; extra == "test"
|
|
24
|
+
Requires-Dist: types-PyYAML==5.4.3; extra == "test"
|
|
38
25
|
Requires-Dist: twine==3.4.1; extra == "test"
|
|
39
|
-
Requires-Dist:
|
|
26
|
+
Requires-Dist: flake8==4.0.1; extra == "test"
|
|
27
|
+
Requires-Dist: requests<3.0.0,>=2.25; extra == "test"
|
|
28
|
+
Requires-Dist: wheel==0.36.2; extra == "test"
|
|
29
|
+
Requires-Dist: mypy==0.991; extra == "test"
|
|
40
30
|
Requires-Dist: freezegun==1.1.0; extra == "test"
|
|
41
31
|
Requires-Dist: types-python-dateutil==2.8.2; extra == "test"
|
|
42
|
-
Requires-Dist:
|
|
32
|
+
Requires-Dist: pytest-pythonpath==0.7.3; extra == "test"
|
|
33
|
+
Requires-Dist: pyyaml<6.1.0,>=5.4.0; extra == "test"
|
|
34
|
+
Requires-Dist: types-requests==2.25.0; extra == "test"
|
|
35
|
+
Requires-Dist: pytest-cov==2.12.1; extra == "test"
|
|
36
|
+
Requires-Dist: aioresponses==0.7.*; extra == "test"
|
|
37
|
+
Requires-Dist: pylint==2.12.*; extra == "test"
|
|
38
|
+
Requires-Dist: pytest-ordering==0.6; extra == "test"
|
|
39
|
+
Requires-Dist: Django==4.2.*; extra == "test"
|
|
40
|
+
Requires-Dist: aiohttp<4.0.0,>=3.8.0; extra == "test"
|
|
43
41
|
Requires-Dist: pytest-django==4.5.2; extra == "test"
|
|
42
|
+
Requires-Dist: pytest-asyncio==0.21.*; extra == "test"
|
|
43
|
+
Requires-Dist: sseclient-py<1.9.0,>=1.7.0; extra == "test"
|
|
44
44
|
Dynamic: author
|
|
45
45
|
Dynamic: author-email
|
|
46
46
|
Dynamic: classifier
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
""" Constants """
|
|
2
|
-
|
|
3
|
-
from enum import Enum
|
|
4
|
-
from typing import Any
|
|
5
|
-
|
|
6
|
-
from kameleoon.logging.kameleoon_logger import KameleoonLogger
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class TargetingOperator(Enum):
|
|
10
|
-
"""Targeting operator in condition"""
|
|
11
|
-
|
|
12
|
-
UNDEFINED = "UNDEFINED"
|
|
13
|
-
CONTAINS = "CONTAINS"
|
|
14
|
-
EXACT = "EXACT"
|
|
15
|
-
REGULAR_EXPRESSION = "REGULAR_EXPRESSION"
|
|
16
|
-
LOWER = "LOWER"
|
|
17
|
-
EQUAL = "EQUAL"
|
|
18
|
-
GREATER = "GREATER"
|
|
19
|
-
TRUE = "TRUE"
|
|
20
|
-
FALSE = "FALSE"
|
|
21
|
-
AMONG_VALUES = "AMONG_VALUES"
|
|
22
|
-
ANY = "ANY"
|
|
23
|
-
UNKNOWN = "UNKNOWN"
|
|
24
|
-
|
|
25
|
-
@classmethod
|
|
26
|
-
def from_string(cls, raw: Any) -> "TargetingOperator":
|
|
27
|
-
"""Parse an operator name from the configuration; unparsable values map to UNKNOWN."""
|
|
28
|
-
try:
|
|
29
|
-
return cls[str(raw).upper()]
|
|
30
|
-
except KeyError:
|
|
31
|
-
KameleoonLogger.error("Unexpected TargetingOperator: %s", raw)
|
|
32
|
-
return cls.UNKNOWN
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"""Number condition"""
|
|
2
|
-
|
|
3
|
-
from typing import Any, Dict, Union
|
|
4
|
-
|
|
5
|
-
from kameleoon.logging.kameleoon_logger import KameleoonLogger
|
|
6
|
-
from kameleoon.targeting.conditions.constants import TargetingOperator
|
|
7
|
-
from kameleoon.targeting.conditions.targeting_condition import TargetingCondition
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class NumberCondition(TargetingCondition):
|
|
11
|
-
"""Number condition uses in case if you need to target by value numeric"""
|
|
12
|
-
|
|
13
|
-
def __init__(self, json_condition: Dict[str, Union[str, int, Any]], value_key: str):
|
|
14
|
-
super().__init__(json_condition)
|
|
15
|
-
try:
|
|
16
|
-
self._match_type = TargetingOperator[str(json_condition.get("matchType"))]
|
|
17
|
-
self._condition_value = json_condition.get(value_key)
|
|
18
|
-
except KeyError as exeception:
|
|
19
|
-
KameleoonLogger.error("%s has wrong JSON structure: %s", self.__class__, exeception)
|
|
20
|
-
|
|
21
|
-
def check(self, data: Any) -> bool:
|
|
22
|
-
return self._check_targeting(data)
|
|
23
|
-
|
|
24
|
-
def _check_targeting(self, value: Any) -> bool:
|
|
25
|
-
if self._match_type == TargetingOperator.EQUAL:
|
|
26
|
-
return value == self._condition_value
|
|
27
|
-
if self._match_type == TargetingOperator.GREATER:
|
|
28
|
-
return self._condition_value is not None and value > self._condition_value
|
|
29
|
-
if self._match_type == TargetingOperator.LOWER:
|
|
30
|
-
return self._condition_value is not None and value < self._condition_value
|
|
31
|
-
KameleoonLogger.error(
|
|
32
|
-
"Unexpected comparing operation for %s condition: %s",
|
|
33
|
-
self.__class__,
|
|
34
|
-
self._match_type,
|
|
35
|
-
)
|
|
36
|
-
return False
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/configuration/rule.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/cbscores.py
RENAMED
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/conversion.py
RENAMED
|
File without changes
|
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/custom_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/geolocation.py
RENAMED
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/kcs_heat.py
RENAMED
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/manager/visitor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/operating_system.py
RENAMED
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/page_view.py
RENAMED
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/personalization.py
RENAMED
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/targeted_segment.py
RENAMED
|
File without changes
|
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/user_agent.py
RENAMED
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/data/visitor_visits.py
RENAMED
|
File without changes
|
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/event_handler.py
RENAMED
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/event_manager.py
RENAMED
|
File without changes
|
{kameleoon_client_python-3.23.0 → kameleoon_client_python-3.24.0}/kameleoon/events/event_type.py
RENAMED
|
File without changes
|