kameleoon-client-python 3.8.0__tar.gz → 3.10.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.
Files changed (179) hide show
  1. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/PKG-INFO +1 -1
  2. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/configuration/data_file.py +20 -1
  3. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/configuration/feature_flag.py +3 -1
  4. kameleoon-client-python-3.10.0/kameleoon/configuration/me_group.py +24 -0
  5. kameleoon-client-python-3.10.0/kameleoon/data/cbscores.py +66 -0
  6. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/data.py +1 -0
  7. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/manager/visitor.py +14 -0
  8. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/exceptions.py +1 -1
  9. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/helpers/hasher.py +5 -0
  10. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/kameleoon_client.py +377 -108
  11. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/remote_data/remote_visitor_data.py +26 -5
  12. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/query_builder.py +3 -2
  13. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/services/service_impl.py +24 -6
  14. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/url_provider.py +17 -16
  15. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/sdk_version.py +1 -1
  16. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/types/remote_visitor_data_filter.py +16 -7
  17. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon_client_python.egg-info/PKG-INFO +1 -1
  18. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon_client_python.egg-info/SOURCES.txt +2 -0
  19. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/MANIFEST.in +0 -0
  20. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/README.md +0 -0
  21. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/__init__.py +0 -0
  22. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/client_readiness/__init__.py +0 -0
  23. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/client_readiness/async_readiness.py +0 -0
  24. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/client_readiness/threading_readiness.py +0 -0
  25. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/configuration/__init__.py +0 -0
  26. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/configuration/custom_data_info.py +0 -0
  27. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/configuration/experiment.py +0 -0
  28. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/configuration/rule.py +0 -0
  29. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/configuration/rule_type.py +0 -0
  30. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/configuration/settings.py +0 -0
  31. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/configuration/variable.py +0 -0
  32. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/configuration/variation.py +0 -0
  33. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/configuration/variation_by_exposition.py +0 -0
  34. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/__init__.py +0 -0
  35. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/browser.py +0 -0
  36. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/conversion.py +0 -0
  37. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/cookie.py +0 -0
  38. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/custom_data.py +0 -0
  39. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/device.py +0 -0
  40. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/geolocation.py +0 -0
  41. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/kcs_heat.py +0 -0
  42. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/manager/__init__.py +0 -0
  43. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/manager/assigned_variation.py +0 -0
  44. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/manager/forced_experiment_variation.py +0 -0
  45. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/manager/forced_feature_variation.py +0 -0
  46. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/manager/forced_variation.py +0 -0
  47. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/manager/page_view_visit.py +0 -0
  48. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/manager/visitor_manager.py +0 -0
  49. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/manager/visitor_slot.py +0 -0
  50. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/mapping_identifier.py +0 -0
  51. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/operating_system.py +0 -0
  52. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/page_view.py +0 -0
  53. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/unique_identifier.py +0 -0
  54. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/user_agent.py +0 -0
  55. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/data/visitor_visits.py +0 -0
  56. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/defaults.py +0 -0
  57. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/helpers/__init__.py +0 -0
  58. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/helpers/domain.py +0 -0
  59. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/helpers/functions.py +0 -0
  60. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/helpers/logger.py +0 -0
  61. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/helpers/multi_threading.py +0 -0
  62. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/helpers/nonce.py +0 -0
  63. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/helpers/repeat_timer.py +0 -0
  64. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/helpers/scheduler.py +0 -0
  65. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/helpers/string_utils.py +0 -0
  66. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/helpers/visitor_code.py +0 -0
  67. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/hybrid/__init__.py +0 -0
  68. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/hybrid/hybrid_manager.py +0 -0
  69. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/hybrid/hybrid_manager_impl.py +0 -0
  70. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/kameleoon_client_config.py +0 -0
  71. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/kameleoon_client_factory.py +0 -0
  72. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/logging/__init__.py +0 -0
  73. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/logging/kameleoon_logger.py +0 -0
  74. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/logging/log_level.py +0 -0
  75. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/logging/logger.py +0 -0
  76. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/__init__.py +0 -0
  77. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/asyncexec/__init__.py +0 -0
  78. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/asyncexec/async_executor.py +0 -0
  79. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/data/__init__.py +0 -0
  80. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/data/data_manager.py +0 -0
  81. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/evaluation/__init__.py +0 -0
  82. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/evaluation/evaluated_experiment.py +0 -0
  83. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/remote_data/__init__.py +0 -0
  84. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/remote_data/remote_data_manager.py +0 -0
  85. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/tracking/__init__.py +0 -0
  86. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/tracking/tracking_builder.py +0 -0
  87. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/tracking/tracking_manager.py +0 -0
  88. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/tracking/visitor_tracking_registry.py +0 -0
  89. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/warehouse/__init__.py +0 -0
  90. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/managers/warehouse/warehouse_manager.py +0 -0
  91. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/middleware.py +0 -0
  92. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/__init__.py +0 -0
  93. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/access_token_source.py +0 -0
  94. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/access_token_source_factory.py +0 -0
  95. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/activity_event.py +0 -0
  96. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/cookie/__init__.py +0 -0
  97. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/cookie/cookie_manager.py +0 -0
  98. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/net_provider.py +0 -0
  99. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/net_provider_impl.py +0 -0
  100. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/network_manager.py +0 -0
  101. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/network_manager_factory.py +0 -0
  102. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/network_manager_factory_impl.py +0 -0
  103. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/network_manager_impl.py +0 -0
  104. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/query_encodable.py +0 -0
  105. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/sendable.py +0 -0
  106. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/service_initialize_context.py +0 -0
  107. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/service_initialize_context_impl.py +0 -0
  108. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/services/__init__.py +0 -0
  109. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/services/automation_service.py +0 -0
  110. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/services/automation_service_impl.py +0 -0
  111. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/services/configuration_service.py +0 -0
  112. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/services/configuration_service_impl.py +0 -0
  113. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/services/data_service.py +0 -0
  114. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/services/data_service_impl.py +0 -0
  115. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/services/service.py +0 -0
  116. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/network/uri_helper.py +0 -0
  117. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/real_time/__init__.py +0 -0
  118. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/real_time/real_time_configuration_service.py +0 -0
  119. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/real_time/real_time_event.py +0 -0
  120. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/storage/__init__.py +0 -0
  121. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/storage/cache.py +0 -0
  122. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/storage/cache_factory.py +0 -0
  123. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/storage/cache_factory_impl.py +0 -0
  124. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/storage/cache_impl.py +0 -0
  125. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/__init__.py +0 -0
  126. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/__init__.py +0 -0
  127. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/browser_condition.py +0 -0
  128. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/constants.py +0 -0
  129. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/conversion_condition.py +0 -0
  130. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/cookie_condition.py +0 -0
  131. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/custom_datum.py +0 -0
  132. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/device_condition.py +0 -0
  133. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/exclusive_feature_flag_condition.py +0 -0
  134. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/geolocation_condition.py +0 -0
  135. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/kcs_heat_range_condition.py +0 -0
  136. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/number_condition.py +0 -0
  137. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/operating_system_condition.py +0 -0
  138. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/page_title_condition.py +0 -0
  139. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/page_url_condition.py +0 -0
  140. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/page_view_number_condition.py +0 -0
  141. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/previous_page_condition.py +0 -0
  142. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/sdk_language_condition.py +0 -0
  143. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/segment_condition.py +0 -0
  144. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/string_value_condition.py +0 -0
  145. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/target_feature_flag_condition.py +0 -0
  146. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/targeting_condition.py +0 -0
  147. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/time_elapsed_since_visit_condition.py +0 -0
  148. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/unknown_condition.py +0 -0
  149. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/visit_number_today_condition.py +0 -0
  150. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/visit_number_total_condition.py +0 -0
  151. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/visitor_code_condition.py +0 -0
  152. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/conditions/visitor_new_return_condition.py +0 -0
  153. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/models.py +0 -0
  154. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/targeting_manager.py +0 -0
  155. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/tree_builder.py +0 -0
  156. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/targeting/tree_condition_factory.py +0 -0
  157. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/types/__init__.py +0 -0
  158. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/types/variable.py +0 -0
  159. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon/types/variation.py +0 -0
  160. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon_client_python.egg-info/dependency_links.txt +0 -0
  161. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon_client_python.egg-info/requires.txt +13 -13
  162. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/kameleoon_client_python.egg-info/top_level.txt +0 -0
  163. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/setup.cfg +0 -0
  164. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/setup.py +0 -0
  165. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/__init__.py +0 -0
  166. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/kameleoon_app/__init__.py +0 -0
  167. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/kameleoon_app/admin.py +0 -0
  168. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/kameleoon_app/apps.py +0 -0
  169. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/kameleoon_app/migrations/__init__.py +0 -0
  170. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/kameleoon_app/models.py +0 -0
  171. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/kameleoon_app/tests.py +0 -0
  172. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/kameleoon_app/views.py +0 -0
  173. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/manage.py +0 -0
  174. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/proj/__init__.py +0 -0
  175. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/proj/asgi.py +0 -0
  176. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/proj/settings.py +0 -0
  177. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/proj/urls.py +0 -0
  178. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/integration/proj/proj/wsgi.py +0 -0
  179. {kameleoon-client-python-3.8.0 → kameleoon-client-python-3.10.0}/tests/resources/config.yml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kameleoon-client-python
3
- Version: 3.8.0
3
+ Version: 3.10.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
@@ -1,10 +1,11 @@
1
1
  """Kameleoon Configuration"""
2
2
 
3
- from typing import Any, Dict, Optional, Set
3
+ from typing import Any, Dict, Iterable, List, Optional, Set
4
4
  from kameleoon.configuration import Variable
5
5
  from kameleoon.configuration.custom_data_info import CustomDataInfo
6
6
  from kameleoon.configuration.experiment import Experiment
7
7
  from kameleoon.configuration.feature_flag import FeatureFlag
8
+ from kameleoon.configuration.me_group import MEGroup
8
9
  from kameleoon.configuration.rule import Rule
9
10
  from kameleoon.configuration.settings import Settings
10
11
  from kameleoon.configuration.variation_by_exposition import VariationByExposition
@@ -52,6 +53,7 @@ class DataFile:
52
53
  self.__environment = environment # pylint: disable=W0238
53
54
  self.__settings = settings
54
55
  self.__feature_flags: Dict[str, FeatureFlag] = feature_flags
56
+ self.__me_groups = self.__make_me_groups(feature_flags.values())
55
57
  self.__has_any_targeted_delivery_rule = any(
56
58
  rule.is_targeted_delivery
57
59
  for ff in self.__feature_flags.values()
@@ -81,6 +83,11 @@ class DataFile:
81
83
  """Returns dictionary of all feature flags stored by feature keys"""
82
84
  return self.__feature_flags
83
85
 
86
+ @property
87
+ def me_groups(self) -> Dict[str, MEGroup]:
88
+ """Returns the mutually exclusive groups by their names"""
89
+ return self.__me_groups
90
+
84
91
  @property
85
92
  def feature_flag_by_id(self) -> Dict[int, FeatureFlag]:
86
93
  """Returns dictionary of all feature flags stored by id"""
@@ -146,6 +153,18 @@ class DataFile:
146
153
  if variation.variation_id is not None:
147
154
  self.__variation_by_id[variation.variation_id] = variation
148
155
 
156
+ @staticmethod
157
+ def __make_me_groups(feature_flags: Iterable[FeatureFlag]) -> Dict[str, MEGroup]:
158
+ me_group_lists: Dict[str, List[FeatureFlag]] = {}
159
+ for feature_flag in feature_flags:
160
+ if feature_flag.me_group_name:
161
+ me_group_list = me_group_lists.get(feature_flag.me_group_name)
162
+ if me_group_list:
163
+ me_group_list.append(feature_flag)
164
+ else:
165
+ me_group_lists[feature_flag.me_group_name] = [feature_flag]
166
+ return {me_group_name: MEGroup(me_group_list) for me_group_name, me_group_list in me_group_lists.items()}
167
+
149
168
  @staticmethod
150
169
  def __has_feature_flag_variable_js_css(feature_flag: FeatureFlag) -> bool:
151
170
  variations = feature_flag.variations
@@ -17,10 +17,11 @@ class FeatureFlag:
17
17
  """Create a list of FeatureFlags from the json array"""
18
18
  return [FeatureFlag(item) for item in array]
19
19
 
20
- def __init__(self, dict_json: Dict[str, Any]):
20
+ def __init__(self, dict_json: Dict[str, Any]) -> None:
21
21
  self.id_: int = dict_json.get("id", 0)
22
22
  self.feature_key: str = dict_json.get("featureKey", "")
23
23
  self.default_variation_key: str = dict_json.get("defaultVariationKey", "")
24
+ self.me_group_name: Optional[str] = dict_json.get("mutuallyExclusiveGroup")
24
25
  self.variations: List[Variation] = Variation.from_array(
25
26
  dict_json.get("variations", [])
26
27
  )
@@ -39,6 +40,7 @@ class FeatureFlag:
39
40
  f"environment_enabled:{self.environment_enabled},"
40
41
  f"variations:{StringUtils.object_to_string(self.variations)},"
41
42
  f"default_variation_key:'{self.default_variation_key}',"
43
+ f"me_group_name:'{self.me_group_name}',"
42
44
  f"rules:{len(self.rules)}"
43
45
  f"}}"
44
46
  )
@@ -0,0 +1,24 @@
1
+ """Kameleoon Configuration"""
2
+
3
+ from typing import List
4
+ from kameleoon.configuration.feature_flag import FeatureFlag
5
+
6
+
7
+ class MEGroup:
8
+ """Represents a mutually exclusive group"""
9
+
10
+ def __init__(self, feature_flags: List[FeatureFlag]) -> None:
11
+ feature_flags.sort(key=lambda ff: ff.id_)
12
+ self.__feature_flags = feature_flags
13
+
14
+ @property
15
+ def feature_flags(self) -> List[FeatureFlag]:
16
+ """Returns the feature flags"""
17
+ return self.__feature_flags
18
+
19
+ def get_feature_flag_by_hash(self, hash_double: float) -> FeatureFlag:
20
+ """Finds a feature flag by the given hash"""
21
+ idx = int(hash_double * len(self.__feature_flags))
22
+ if idx >= len(self.__feature_flags):
23
+ idx = len(self.__feature_flags) - 1
24
+ return self.__feature_flags[idx]
@@ -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}}}"
@@ -22,6 +22,7 @@ class DataType(IntEnum):
22
22
  UNIQUE_IDENTIFIER = 13
23
23
  FORCED_EXPERIMENT_VARIATION = 14
24
24
  FORCED_FEATURE_VARIATION = 15
25
+ CBS = 16
25
26
 
26
27
 
27
28
  class BaseData:
@@ -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,
@@ -70,7 +70,7 @@ class FeatureNotFound(NotFoundError):
70
70
  super().__init__(self.message)
71
71
 
72
72
 
73
- class FeatureExperimentNotFound(NotFoundError): # //~ Derived from FeatureError in other SDKs
73
+ class FeatureExperimentNotFound(NotFoundError):
74
74
  """Exception indicating that the requested experiment has not been found.
75
75
  Check that the experiment's ID matches the provided one."""
76
76
 
@@ -19,6 +19,11 @@ class Hasher:
19
19
  identifier += str(respool_time)
20
20
  return Hasher._calculate(identifier)
21
21
 
22
+ @staticmethod
23
+ def obtain_hash_for_me_group(visitor_code: str, me_group_name: str) -> float:
24
+ """Calculate the hash value for a mutually exclusive group for a given visitor code"""
25
+ return Hasher._calculate(visitor_code + me_group_name)
26
+
22
27
  @staticmethod
23
28
  def _calculate(str_to_hash: str) -> float:
24
29
  return int(hashlib.sha256(str_to_hash.encode("UTF-8")).hexdigest(), 16) / math.pow(2, 256)