recombee-api-client 4.0.0__tar.gz → 5.0.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.
- recombee-api-client-5.0.0/PKG-INFO +203 -0
- recombee-api-client-5.0.0/recombee_api_client/__init__.py +1 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_client.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/__init__.py +17 -6
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_bookmark.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_cart_addition.py +4 -4
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_detail_view.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_item.py +3 -3
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_item_property.py +2 -2
- recombee-api-client-5.0.0/recombee_api_client/api_requests/add_manual_reql_segment.py +53 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_purchase.py +5 -5
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_rating.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_search_synonym.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_series.py +11 -3
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_user.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_user_property.py +2 -2
- recombee-api-client-5.0.0/recombee_api_client/api_requests/create_auto_reql_segmentation.py +61 -0
- recombee-api-client-5.0.0/recombee_api_client/api_requests/create_manual_reql_segmentation.py +56 -0
- recombee-api-client-5.0.0/recombee_api_client/api_requests/create_property_based_segmentation.py +62 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_all_search_synonyms.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_bookmark.py +4 -4
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_cart_addition.py +4 -4
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_detail_view.py +4 -4
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_item.py +3 -3
- recombee-api-client-5.0.0/recombee_api_client/api_requests/delete_manual_reql_segment.py +37 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_more_items.py +4 -4
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_purchase.py +4 -4
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_rating.py +3 -3
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_search_synonym.py +1 -1
- recombee-api-client-5.0.0/recombee_api_client/api_requests/delete_segmentation.py +34 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_series.py +11 -3
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_user.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_user_property.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_view_portion.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/get_item_property_info.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/get_item_values.py +3 -3
- recombee-api-client-5.0.0/recombee_api_client/api_requests/get_segmentation.py +34 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/get_user_values.py +3 -3
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/insert_to_series.py +3 -3
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_item_bookmarks.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_item_cart_additions.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_item_detail_views.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_item_properties.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_item_purchases.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_item_ratings.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_item_view_portions.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_items.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_search_synonyms.py +1 -1
- recombee-api-client-4.0.0/recombee_api_client/api_requests/delete_group.py → recombee-api-client-5.0.0/recombee_api_client/api_requests/list_segmentations.py +7 -8
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_series.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_series_items.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_user_bookmarks.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_user_cart_additions.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_user_detail_views.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_user_properties.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_user_purchases.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_user_ratings.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_user_view_portions.py +1 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/list_users.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/merge_users.py +2 -2
- recombee-api-client-5.0.0/recombee_api_client/api_requests/recommend_item_segments_to_item.py +144 -0
- recombee-api-client-5.0.0/recombee_api_client/api_requests/recommend_item_segments_to_item_segment.py +144 -0
- recombee-api-client-5.0.0/recombee_api_client/api_requests/recommend_item_segments_to_user.py +111 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/recommend_items_to_item.py +26 -26
- recombee-api-client-5.0.0/recombee_api_client/api_requests/recommend_items_to_item_segment.py +274 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/recommend_items_to_user.py +23 -23
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/recommend_next_items.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/recommend_users_to_item.py +18 -18
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/recommend_users_to_user.py +21 -21
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/remove_from_series.py +4 -8
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/reset_database.py +2 -2
- recombee-api-client-5.0.0/recombee_api_client/api_requests/search_item_segments.py +115 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/search_items.py +17 -17
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/set_view_portion.py +4 -4
- recombee-api-client-5.0.0/recombee_api_client/api_requests/update_auto_reql_segmentation.py +55 -0
- recombee-api-client-5.0.0/recombee_api_client/api_requests/update_manual_reql_segment.py +51 -0
- recombee-api-client-5.0.0/recombee_api_client/api_requests/update_manual_reql_segmentation.py +49 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/update_more_items.py +4 -4
- recombee-api-client-5.0.0/recombee_api_client/api_requests/update_property_based_segmentation.py +55 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/exceptions.py +1 -1
- recombee-api-client-5.0.0/recombee_api_client.egg-info/PKG-INFO +203 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client.egg-info/SOURCES.txt +49 -16
- recombee-api-client-5.0.0/recombee_api_client.egg-info/requires.txt +1 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client.egg-info/top_level.txt +0 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/setup.py +10 -15
- recombee-api-client-5.0.0/tests/test_cases/__init__.py +1 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/add_entity.py +6 -3
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/add_interaction.py +7 -11
- recombee-api-client-5.0.0/tests/test_cases/add_manual_reql_segment.py +26 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/add_property.py +6 -3
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/add_rating.py +8 -12
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/add_search_synonym.py +5 -2
- recombee-api-client-5.0.0/tests/test_cases/create_auto_reql_segmentation.py +30 -0
- recombee-api-client-5.0.0/tests/test_cases/create_manual_reql_segmentation.py +30 -0
- recombee-api-client-5.0.0/tests/test_cases/create_property_based_segmentation.py +30 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/delete_all_search_synonyms.py +4 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/delete_entity.py +7 -4
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/delete_interaction.py +5 -2
- recombee-api-client-5.0.0/tests/test_cases/delete_manual_reql_segment.py +28 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/delete_more_items.py +4 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/delete_property.py +7 -4
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/delete_search_synonym.py +5 -2
- recombee-api-client-5.0.0/tests/test_cases/delete_segmentation.py +32 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/delete_view_portion.py +5 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/get_property_info.py +4 -1
- recombee-api-client-5.0.0/tests/test_cases/get_segmentation.py +27 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/get_values.py +4 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/insert_to_series.py +5 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/item_to_item_recommendation.py +4 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/list_entities.py +5 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/list_entities_with_properties.py +6 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/list_item_interactions.py +5 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/list_properties.py +5 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/list_search_synonyms.py +5 -1
- recombee-api-client-5.0.0/tests/test_cases/list_segmentations.py +28 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/list_set_items.py +5 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/list_user_interactions.py +5 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/merge_users.py +5 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/next_items_recommendation.py +4 -1
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/recombee_test.py +1 -3
- recombee-api-client-5.0.0/tests/test_cases/recommend_item_segments_to_item.py +28 -0
- recombee-api-client-5.0.0/tests/test_cases/recommend_item_segments_to_user.py +28 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/recommendation.py +4 -1
- recombee-api-client-4.0.0/tests/test_cases/remove_from_group.py → recombee-api-client-5.0.0/tests/test_cases/remove_from_series.py +7 -4
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/search.py +4 -1
- recombee-api-client-5.0.0/tests/test_cases/search_item_segments.py +28 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/set_values.py +5 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/set_view_portion.py +8 -12
- recombee-api-client-5.0.0/tests/test_cases/test_add_manual_reql_segment.py +13 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_add_series.py +2 -2
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_batch.py +1 -1
- recombee-api-client-5.0.0/tests/test_cases/test_create_auto_reql_segmentation.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_create_manual_reql_segmentation.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_create_property_based_segmentation.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_delete_manual_reql_segment.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_delete_segmentation.py +13 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_series.py +2 -2
- recombee-api-client-5.0.0/tests/test_cases/test_get_segmentation.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_list_segmentations.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_recommend_item_segments_to_item.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_recommend_item_segments_to_item_segment.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_recommend_item_segments_to_user.py +13 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_remove_from_series.py +2 -2
- recombee-api-client-5.0.0/tests/test_cases/test_search_item_segments.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_update_auto_reql_segmentation.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_update_manual_reql_segment.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_update_manual_reql_segmentation.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/test_update_property_based_segmentation.py +13 -0
- recombee-api-client-5.0.0/tests/test_cases/update_auto_reql_segmentation.py +26 -0
- recombee-api-client-5.0.0/tests/test_cases/update_manual_reql_segment.py +28 -0
- recombee-api-client-5.0.0/tests/test_cases/update_manual_reql_segmentation.py +26 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/update_more_items.py +4 -1
- recombee-api-client-5.0.0/tests/test_cases/update_property_based_segmentation.py +26 -0
- recombee-api-client-4.0.0/PKG-INFO +0 -201
- recombee-api-client-4.0.0/recombee_api_client/__init__.py +0 -0
- recombee-api-client-4.0.0/recombee_api_client/api_requests/add_group.py +0 -33
- recombee-api-client-4.0.0/recombee_api_client/api_requests/insert_to_group.py +0 -50
- recombee-api-client-4.0.0/recombee_api_client/api_requests/list_group_items.py +0 -33
- recombee-api-client-4.0.0/recombee_api_client/api_requests/list_groups.py +0 -28
- recombee-api-client-4.0.0/recombee_api_client/api_requests/remove_from_group.py +0 -41
- recombee-api-client-4.0.0/recombee_api_client.egg-info/PKG-INFO +0 -201
- recombee-api-client-4.0.0/recombee_api_client.egg-info/requires.txt +0 -1
- recombee-api-client-4.0.0/tests/test_cases/__init__.py +0 -0
- recombee-api-client-4.0.0/tests/test_cases/insert_to_group.py +0 -36
- recombee-api-client-4.0.0/tests/test_cases/remove_from_series.py +0 -35
- recombee-api-client-4.0.0/tests/test_cases/test_add_group.py +0 -13
- recombee-api-client-4.0.0/tests/test_cases/test_delete_group.py +0 -13
- recombee-api-client-4.0.0/tests/test_cases/test_insert_to_group.py +0 -13
- recombee-api-client-4.0.0/tests/test_cases/test_item_based_recommendation.py +0 -10
- recombee-api-client-4.0.0/tests/test_cases/test_list_group_items.py +0 -13
- recombee-api-client-4.0.0/tests/test_cases/test_list_groups.py +0 -13
- recombee-api-client-4.0.0/tests/test_cases/test_remove_from_group.py +0 -13
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/README.rst +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/batch.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/delete_item_property.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/get_user_property_info.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/request.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/set_item_values.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/set_user_values.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/set_values.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client.egg-info/dependency_links.txt +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/setup.cfg +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_add_bookmark.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_add_cart_addition.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_add_detail_view.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_add_item.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_add_item_property.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_add_purchase.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_add_rating.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_add_search_synonym.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_add_user.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_add_user_property.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_all_search_synonyms.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_bookmark.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_cart_addition.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_detail_view.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_item.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_item_property.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_more_items.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_purchase.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_rating.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_search_synonym.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_user.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_user_property.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_delete_view_portion.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_get_item_property_info.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_get_item_values.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_get_user_property_info.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_get_user_values.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_insert_to_series.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_item_bookmarks.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_item_cart_additions.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_item_detail_views.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_item_properties.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_item_purchases.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_item_ratings.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_item_view_portions.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_items.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_search_synonyms.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_series.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_series_items.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_user_bookmarks.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_user_cart_additions.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_user_detail_views.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_user_properties.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_user_purchases.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_user_ratings.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_user_view_portions.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_list_users.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_merge_users.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_recommend_items_to_item.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_recommend_items_to_user.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_recommend_next_items.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_recommend_users_to_item.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_recommend_users_to_user.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_search_items.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_set_item_values.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_set_user_values.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_set_view_portion.py +0 -0
- {recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/tests/test_cases/test_update_more_items.py +0 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: recombee-api-client
|
|
3
|
+
Version: 5.0.0
|
|
4
|
+
Summary: Client for Recombee recommendation API
|
|
5
|
+
Home-page: https://github.com/Recombee/python-api-client
|
|
6
|
+
Author: Recombee
|
|
7
|
+
Author-email: ondrej.fiedler@recombee.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: recommendation engine,recommender engine as a service,search,personalization,recombee,API client,machine learning
|
|
10
|
+
Platform: UNKNOWN
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering
|
|
14
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Requires-Python: >=3.6
|
|
24
|
+
|
|
25
|
+
*****************
|
|
26
|
+
RecombeeApiClient
|
|
27
|
+
*****************
|
|
28
|
+
|
|
29
|
+
A Python 3 client for easy use of the `Recombee <https://www.recombee.com/>`_ recommendation API.
|
|
30
|
+
|
|
31
|
+
If you don't have an account at Recombee yet, you can create a free account `here <https://www.recombee.com/>`_.
|
|
32
|
+
|
|
33
|
+
Documentation of the API can be found at `docs.recombee.com <https://docs.recombee.com/>`_.
|
|
34
|
+
|
|
35
|
+
=============
|
|
36
|
+
Installation
|
|
37
|
+
=============
|
|
38
|
+
|
|
39
|
+
Install the client with pip:
|
|
40
|
+
|
|
41
|
+
.. code-block:: bash
|
|
42
|
+
|
|
43
|
+
$ pip install recombee-api-client
|
|
44
|
+
|
|
45
|
+
========
|
|
46
|
+
Examples
|
|
47
|
+
========
|
|
48
|
+
|
|
49
|
+
-------------
|
|
50
|
+
Basic example
|
|
51
|
+
-------------
|
|
52
|
+
|
|
53
|
+
.. code-block:: python
|
|
54
|
+
|
|
55
|
+
from recombee_api_client.api_client import RecombeeClient, Region
|
|
56
|
+
from recombee_api_client.exceptions import APIException
|
|
57
|
+
from recombee_api_client.api_requests import *
|
|
58
|
+
import random
|
|
59
|
+
|
|
60
|
+
client = RecombeeClient('--my-database-id--', '--db-private-token--', region=Region.US_WEST)
|
|
61
|
+
|
|
62
|
+
#Generate some random purchases of items by users
|
|
63
|
+
PROBABILITY_PURCHASED = 0.1
|
|
64
|
+
NUM = 100
|
|
65
|
+
purchase_requests = []
|
|
66
|
+
|
|
67
|
+
for user_id in ["user-%s" % i for i in range(NUM) ]:
|
|
68
|
+
for item_id in ["item-%s" % i for i in range(NUM) ]:
|
|
69
|
+
if random.random() < PROBABILITY_PURCHASED:
|
|
70
|
+
|
|
71
|
+
request = AddPurchase(user_id, item_id, cascade_create=True)
|
|
72
|
+
purchase_requests.append(request)
|
|
73
|
+
|
|
74
|
+
try:
|
|
75
|
+
# Send the data to Recombee, use Batch for faster processing of larger data
|
|
76
|
+
print('Send purchases')
|
|
77
|
+
client.send(Batch(purchase_requests))
|
|
78
|
+
|
|
79
|
+
# Get recommendations for user 'user-25'
|
|
80
|
+
response = client.send(RecommendItemsToUser('user-25', 5))
|
|
81
|
+
print("Recommended items: %s" % response)
|
|
82
|
+
|
|
83
|
+
# User scrolled down - get next 3 recommended items
|
|
84
|
+
response = client.send(RecommendNextItems(response['recommId'], 3))
|
|
85
|
+
print("Next recommended items: %s" % response)
|
|
86
|
+
|
|
87
|
+
except APIException as e:
|
|
88
|
+
print(e)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
---------------------
|
|
93
|
+
Using property values
|
|
94
|
+
---------------------
|
|
95
|
+
|
|
96
|
+
.. code-block:: python
|
|
97
|
+
|
|
98
|
+
from recombee_api_client.api_client import RecombeeClient, Region
|
|
99
|
+
from recombee_api_client.api_requests import AddItemProperty, SetItemValues, AddPurchase
|
|
100
|
+
from recombee_api_client.api_requests import RecommendItemsToItem, SearchItems, Batch, ResetDatabase
|
|
101
|
+
import random
|
|
102
|
+
|
|
103
|
+
NUM = 100
|
|
104
|
+
PROBABILITY_PURCHASED = 0.1
|
|
105
|
+
|
|
106
|
+
client = RecombeeClient('--my-database-id--', '--db-private-token--', region=Region.AP_SE)
|
|
107
|
+
|
|
108
|
+
# Clear the entire database
|
|
109
|
+
client.send(ResetDatabase())
|
|
110
|
+
|
|
111
|
+
# We will use computers as items in this example
|
|
112
|
+
# Computers have four properties
|
|
113
|
+
# - price (floating point number)
|
|
114
|
+
# - number of processor cores (integer number)
|
|
115
|
+
# - description (string)
|
|
116
|
+
# - image (url of computer's photo)
|
|
117
|
+
|
|
118
|
+
# Add properties of items
|
|
119
|
+
client.send(AddItemProperty('price', 'double'))
|
|
120
|
+
client.send(AddItemProperty('num-cores', 'int'))
|
|
121
|
+
client.send(AddItemProperty('description', 'string'))
|
|
122
|
+
client.send(AddItemProperty('image', 'image'))
|
|
123
|
+
|
|
124
|
+
# Prepare requests for setting a catalog of computers
|
|
125
|
+
requests = [SetItemValues(
|
|
126
|
+
"computer-%s" % i, #itemId
|
|
127
|
+
#values:
|
|
128
|
+
{
|
|
129
|
+
'price': random.uniform(500, 2000),
|
|
130
|
+
'num-cores': random.randrange(1,9),
|
|
131
|
+
'description': 'Great computer',
|
|
132
|
+
'image': 'http://examplesite.com/products/computer-%s.jpg' % i
|
|
133
|
+
},
|
|
134
|
+
cascade_create=True # Use cascadeCreate for creating item
|
|
135
|
+
# with given itemId if it doesn't exist
|
|
136
|
+
) for i in range(NUM)]
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
# Send catalog to the recommender system
|
|
140
|
+
client.send(Batch(requests))
|
|
141
|
+
|
|
142
|
+
# Prepare some purchases of items by users
|
|
143
|
+
requests = []
|
|
144
|
+
items = ["computer-%s" % i for i in range(NUM)]
|
|
145
|
+
users = ["user-%s" % i for i in range(NUM)]
|
|
146
|
+
|
|
147
|
+
for item_id in items:
|
|
148
|
+
#Use cascadeCreate to create unexisting users
|
|
149
|
+
purchasing_users = [user_id for user_id in users if random.random() < PROBABILITY_PURCHASED]
|
|
150
|
+
requests += [AddPurchase(user_id, item_id, cascade_create=True) for user_id in purchasing_users]
|
|
151
|
+
|
|
152
|
+
# Send purchases to the recommender system
|
|
153
|
+
client.send(Batch(requests))
|
|
154
|
+
|
|
155
|
+
# Get 5 recommendations for user-42, who is currently viewing computer-6
|
|
156
|
+
# Recommend only computers that have at least 3 cores
|
|
157
|
+
recommended = client.send(
|
|
158
|
+
RecommendItemsToItem('computer-6', 'user-42', 5, filter="'num-cores'>=3")
|
|
159
|
+
)
|
|
160
|
+
print("Recommended items with at least 3 processor cores: %s" % recommended)
|
|
161
|
+
|
|
162
|
+
# Recommend only items that are more expensive then currently viewed item (up-sell)
|
|
163
|
+
recommended = client.send(
|
|
164
|
+
RecommendItemsToItem('computer-6', 'user-42', 5, filter="'price' > context_item[\"price\"]")
|
|
165
|
+
)
|
|
166
|
+
print("Recommended up-sell items: %s" % recommended)
|
|
167
|
+
|
|
168
|
+
# Filters, boosters and other settings can be also set in the Admin UI (admin.recombee.com)
|
|
169
|
+
# when scenario is specified
|
|
170
|
+
recommended = client.send(
|
|
171
|
+
RecommendItemsToItem('computer-6', 'user-42', 5, scenario='product_detail')
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
# Perform personalized full-text search with a user's search query (e.g. 'computers').
|
|
175
|
+
matches = client.send(SearchItems('user-42', 'computers', 5, scenario='search_top'))
|
|
176
|
+
print("Matched items: %s" % matches)
|
|
177
|
+
|
|
178
|
+
------------------
|
|
179
|
+
Exception handling
|
|
180
|
+
------------------
|
|
181
|
+
|
|
182
|
+
For the sake of brevity, the above examples omit exception handling. However, various exceptions can occur while processing request, for example because of adding an already existing item, submitting interaction of nonexistent user or because of timeout.
|
|
183
|
+
|
|
184
|
+
We are doing our best to provide the fastest and most reliable service, but production-level applications must implement a fallback solution since errors can always happen. The fallback might be, for example, showing the most popular items from the current category, or not displaying recommendations at all.
|
|
185
|
+
|
|
186
|
+
Example:
|
|
187
|
+
|
|
188
|
+
.. code-block:: python
|
|
189
|
+
|
|
190
|
+
from recombee_api_client.exceptions import *
|
|
191
|
+
|
|
192
|
+
try:
|
|
193
|
+
recommended = client.send(
|
|
194
|
+
RecommendItemsToItem('computer-6', 'user-42', 5, filter="'price' > context_item[\"price\"]")
|
|
195
|
+
)
|
|
196
|
+
except ResponseException as e:
|
|
197
|
+
#Handle errorneous request => use fallback
|
|
198
|
+
except ApiTimeoutException as e:
|
|
199
|
+
#Handle timeout => use fallback
|
|
200
|
+
except APIException as e:
|
|
201
|
+
#APIException is parent of both ResponseException and ApiTimeoutException
|
|
202
|
+
|
|
203
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -94,7 +94,7 @@ class RecombeeClient:
|
|
|
94
94
|
|
|
95
95
|
@staticmethod
|
|
96
96
|
def __get_http_headers(additional_headers: dict = None) -> dict:
|
|
97
|
-
headers = {'User-Agent': 'recombee-python-api-client/
|
|
97
|
+
headers = {'User-Agent': 'recombee-python-api-client/5.0.0'}
|
|
98
98
|
if additional_headers:
|
|
99
99
|
headers.update(additional_headers)
|
|
100
100
|
return headers
|
{recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/__init__.py
RENAMED
|
@@ -15,12 +15,6 @@ from recombee_api_client.api_requests.list_series import ListSeries
|
|
|
15
15
|
from recombee_api_client.api_requests.list_series_items import ListSeriesItems
|
|
16
16
|
from recombee_api_client.api_requests.insert_to_series import InsertToSeries
|
|
17
17
|
from recombee_api_client.api_requests.remove_from_series import RemoveFromSeries
|
|
18
|
-
from recombee_api_client.api_requests.add_group import AddGroup
|
|
19
|
-
from recombee_api_client.api_requests.delete_group import DeleteGroup
|
|
20
|
-
from recombee_api_client.api_requests.list_groups import ListGroups
|
|
21
|
-
from recombee_api_client.api_requests.list_group_items import ListGroupItems
|
|
22
|
-
from recombee_api_client.api_requests.insert_to_group import InsertToGroup
|
|
23
|
-
from recombee_api_client.api_requests.remove_from_group import RemoveFromGroup
|
|
24
18
|
from recombee_api_client.api_requests.add_user import AddUser
|
|
25
19
|
from recombee_api_client.api_requests.delete_user import DeleteUser
|
|
26
20
|
from recombee_api_client.api_requests.set_user_values import SetUserValues
|
|
@@ -60,11 +54,28 @@ from recombee_api_client.api_requests.recommend_items_to_item import RecommendIt
|
|
|
60
54
|
from recombee_api_client.api_requests.recommend_next_items import RecommendNextItems
|
|
61
55
|
from recombee_api_client.api_requests.recommend_users_to_user import RecommendUsersToUser
|
|
62
56
|
from recombee_api_client.api_requests.recommend_users_to_item import RecommendUsersToItem
|
|
57
|
+
from recombee_api_client.api_requests.recommend_item_segments_to_user import RecommendItemSegmentsToUser
|
|
58
|
+
from recombee_api_client.api_requests.recommend_item_segments_to_item import RecommendItemSegmentsToItem
|
|
59
|
+
from recombee_api_client.api_requests.recommend_item_segments_to_item_segment import RecommendItemSegmentsToItemSegment
|
|
60
|
+
from recombee_api_client.api_requests.recommend_items_to_item_segment import RecommendItemsToItemSegment
|
|
63
61
|
from recombee_api_client.api_requests.search_items import SearchItems
|
|
62
|
+
from recombee_api_client.api_requests.search_item_segments import SearchItemSegments
|
|
64
63
|
from recombee_api_client.api_requests.add_search_synonym import AddSearchSynonym
|
|
65
64
|
from recombee_api_client.api_requests.list_search_synonyms import ListSearchSynonyms
|
|
66
65
|
from recombee_api_client.api_requests.delete_all_search_synonyms import DeleteAllSearchSynonyms
|
|
67
66
|
from recombee_api_client.api_requests.delete_search_synonym import DeleteSearchSynonym
|
|
67
|
+
from recombee_api_client.api_requests.create_property_based_segmentation import CreatePropertyBasedSegmentation
|
|
68
|
+
from recombee_api_client.api_requests.update_property_based_segmentation import UpdatePropertyBasedSegmentation
|
|
69
|
+
from recombee_api_client.api_requests.create_auto_reql_segmentation import CreateAutoReqlSegmentation
|
|
70
|
+
from recombee_api_client.api_requests.update_auto_reql_segmentation import UpdateAutoReqlSegmentation
|
|
71
|
+
from recombee_api_client.api_requests.create_manual_reql_segmentation import CreateManualReqlSegmentation
|
|
72
|
+
from recombee_api_client.api_requests.update_manual_reql_segmentation import UpdateManualReqlSegmentation
|
|
73
|
+
from recombee_api_client.api_requests.add_manual_reql_segment import AddManualReqlSegment
|
|
74
|
+
from recombee_api_client.api_requests.update_manual_reql_segment import UpdateManualReqlSegment
|
|
75
|
+
from recombee_api_client.api_requests.delete_manual_reql_segment import DeleteManualReqlSegment
|
|
76
|
+
from recombee_api_client.api_requests.list_segmentations import ListSegmentations
|
|
77
|
+
from recombee_api_client.api_requests.get_segmentation import GetSegmentation
|
|
78
|
+
from recombee_api_client.api_requests.delete_segmentation import DeleteSegmentation
|
|
68
79
|
from recombee_api_client.api_requests.reset_database import ResetDatabase
|
|
69
80
|
from recombee_api_client.api_requests.batch import Batch
|
|
70
81
|
from recombee_api_client.api_requests.request import Request
|
|
@@ -6,7 +6,7 @@ DEFAULT = uuid.uuid4()
|
|
|
6
6
|
|
|
7
7
|
class AddBookmark(Request):
|
|
8
8
|
"""
|
|
9
|
-
Adds a bookmark of
|
|
9
|
+
Adds a bookmark of the given item made by the given user.
|
|
10
10
|
|
|
11
11
|
Required parameters:
|
|
12
12
|
|
|
@@ -29,7 +29,7 @@ class AddBookmark(Request):
|
|
|
29
29
|
"""
|
|
30
30
|
|
|
31
31
|
def __init__(self, user_id: str, item_id: str, timestamp: Union[str, int] = DEFAULT, cascade_create: bool = DEFAULT, recomm_id: str = DEFAULT, additional_data: dict = DEFAULT):
|
|
32
|
-
super().__init__(path="/bookmarks/"
|
|
32
|
+
super().__init__(path="/bookmarks/", method='post', timeout=3000, ensure_https=False)
|
|
33
33
|
self.user_id = user_id
|
|
34
34
|
self.item_id = item_id
|
|
35
35
|
self.timestamp = timestamp
|
|
@@ -6,7 +6,7 @@ DEFAULT = uuid.uuid4()
|
|
|
6
6
|
|
|
7
7
|
class AddCartAddition(Request):
|
|
8
8
|
"""
|
|
9
|
-
Adds a cart addition of
|
|
9
|
+
Adds a cart addition of the given item made by the given user.
|
|
10
10
|
|
|
11
11
|
Required parameters:
|
|
12
12
|
|
|
@@ -21,9 +21,9 @@ class AddCartAddition(Request):
|
|
|
21
21
|
|
|
22
22
|
:param cascade_create: Sets whether the given user/item should be created if not present in the database.
|
|
23
23
|
|
|
24
|
-
:param amount: Amount (number) added to cart. The default is 1. For example if `user-x` adds two `item-y` during a single order (session...), the `amount` should equal
|
|
24
|
+
:param amount: Amount (number) added to cart. The default is 1. For example, if `user-x` adds two `item-y` during a single order (session...), the `amount` should equal 2.
|
|
25
25
|
|
|
26
|
-
:param price: Price of the added item. If `amount` is greater than 1, sum of prices of all the items should be given.
|
|
26
|
+
:param price: Price of the added item. If `amount` is greater than 1, the sum of prices of all the items should be given.
|
|
27
27
|
|
|
28
28
|
:param recomm_id: If this cart addition is based on a recommendation request, `recommId` is the id of the clicked recommendation.
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ class AddCartAddition(Request):
|
|
|
33
33
|
"""
|
|
34
34
|
|
|
35
35
|
def __init__(self, user_id: str, item_id: str, timestamp: Union[str, int] = DEFAULT, cascade_create: bool = DEFAULT, amount: float = DEFAULT, price: float = DEFAULT, recomm_id: str = DEFAULT, additional_data: dict = DEFAULT):
|
|
36
|
-
super().__init__(path="/cartadditions/"
|
|
36
|
+
super().__init__(path="/cartadditions/", method='post', timeout=3000, ensure_https=False)
|
|
37
37
|
self.user_id = user_id
|
|
38
38
|
self.item_id = item_id
|
|
39
39
|
self.timestamp = timestamp
|
|
@@ -6,7 +6,7 @@ DEFAULT = uuid.uuid4()
|
|
|
6
6
|
|
|
7
7
|
class AddDetailView(Request):
|
|
8
8
|
"""
|
|
9
|
-
Adds a detail view of
|
|
9
|
+
Adds a detail view of the given item made by the given user.
|
|
10
10
|
|
|
11
11
|
Required parameters:
|
|
12
12
|
|
|
@@ -31,7 +31,7 @@ class AddDetailView(Request):
|
|
|
31
31
|
"""
|
|
32
32
|
|
|
33
33
|
def __init__(self, user_id: str, item_id: str, timestamp: Union[str, int] = DEFAULT, duration: int = DEFAULT, cascade_create: bool = DEFAULT, recomm_id: str = DEFAULT, additional_data: dict = DEFAULT):
|
|
34
|
-
super().__init__(path="/detailviews/"
|
|
34
|
+
super().__init__(path="/detailviews/", method='post', timeout=3000, ensure_https=False)
|
|
35
35
|
self.user_id = user_id
|
|
36
36
|
self.item_id = item_id
|
|
37
37
|
self.timestamp = timestamp
|
{recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_item.py
RENAMED
|
@@ -6,9 +6,9 @@ DEFAULT = uuid.uuid4()
|
|
|
6
6
|
|
|
7
7
|
class AddItem(Request):
|
|
8
8
|
"""
|
|
9
|
-
Adds new item of given `itemId` to the items catalog.
|
|
9
|
+
Adds new item of the given `itemId` to the items catalog.
|
|
10
10
|
|
|
11
|
-
All the item properties for the newly created items are set null.
|
|
11
|
+
All the item properties for the newly created items are set to null.
|
|
12
12
|
|
|
13
13
|
Required parameters:
|
|
14
14
|
|
|
@@ -18,7 +18,7 @@ class AddItem(Request):
|
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
def __init__(self, item_id: str):
|
|
21
|
-
super().__init__(path="/items/%s" % (item_id), method='put', timeout=
|
|
21
|
+
super().__init__(path="/items/%s" % (item_id), method='put', timeout=3000, ensure_https=False)
|
|
22
22
|
self.item_id = item_id
|
|
23
23
|
|
|
24
24
|
def get_body_parameters(self) -> dict:
|
|
@@ -6,11 +6,11 @@ DEFAULT = uuid.uuid4()
|
|
|
6
6
|
|
|
7
7
|
class AddItemProperty(Request):
|
|
8
8
|
"""
|
|
9
|
-
Adding an item property is
|
|
9
|
+
Adding an item property is somewhat equivalent to adding a column to the table of items. The items may be characterized by various properties of different types.
|
|
10
10
|
|
|
11
11
|
Required parameters:
|
|
12
12
|
|
|
13
|
-
:param property_name: Name of the item property to be created. Currently, the following names are reserved
|
|
13
|
+
:param property_name: Name of the item property to be created. Currently, the following names are reserved: `id`, `itemid`, case-insensitively. Also, the length of the property name must not exceed 63 characters.
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
:param type: Value type of the item property to be created. One of: `int`, `double`, `string`, `boolean`, `timestamp`, `set`, `image` or `imageList`.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from recombee_api_client.api_requests.request import Request
|
|
2
|
+
from typing import Union, List
|
|
3
|
+
import uuid
|
|
4
|
+
|
|
5
|
+
DEFAULT = uuid.uuid4()
|
|
6
|
+
|
|
7
|
+
class AddManualReqlSegment(Request):
|
|
8
|
+
"""
|
|
9
|
+
Adds a new Segment into a Manual ReQL Segmentation.
|
|
10
|
+
|
|
11
|
+
The new Segment is defined by a [ReQL](https://docs.recombee.com/reql.html) filter that returns `true` for an item in case that this item belongs to the segment.
|
|
12
|
+
|
|
13
|
+
Required parameters:
|
|
14
|
+
|
|
15
|
+
:param segmentation_id: ID of the Segmentation to which the new Segment should be added
|
|
16
|
+
|
|
17
|
+
:param segment_id: ID of the newly created Segment
|
|
18
|
+
|
|
19
|
+
:param filter: ReQL filter that returns `true` for items that belong to this Segment. Otherwise returns `false`.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
Optional parameters:
|
|
24
|
+
|
|
25
|
+
:param title: Human-readable name of the Segment that is shown in the Recombee Admin UI.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
def __init__(self, segmentation_id: str, segment_id: str, filter: str, title: str = DEFAULT):
|
|
32
|
+
super().__init__(path="/segmentations/manual-reql/%s/segments/%s" % (segmentation_id,segment_id), method='put', timeout=10000, ensure_https=False)
|
|
33
|
+
self.segmentation_id = segmentation_id
|
|
34
|
+
self.segment_id = segment_id
|
|
35
|
+
self.filter = filter
|
|
36
|
+
self.title = title
|
|
37
|
+
|
|
38
|
+
def get_body_parameters(self) -> dict:
|
|
39
|
+
"""
|
|
40
|
+
Values of body parameters as a dictionary (name of parameter: value of the parameter).
|
|
41
|
+
"""
|
|
42
|
+
p = dict()
|
|
43
|
+
p['filter'] = self.filter
|
|
44
|
+
if self.title is not DEFAULT:
|
|
45
|
+
p['title'] = self.title
|
|
46
|
+
return p
|
|
47
|
+
|
|
48
|
+
def get_query_parameters(self) -> dict:
|
|
49
|
+
"""
|
|
50
|
+
Values of query parameters as a dictionary (name of parameter: value of the parameter).
|
|
51
|
+
"""
|
|
52
|
+
params = dict()
|
|
53
|
+
return params
|
|
@@ -6,7 +6,7 @@ DEFAULT = uuid.uuid4()
|
|
|
6
6
|
|
|
7
7
|
class AddPurchase(Request):
|
|
8
8
|
"""
|
|
9
|
-
Adds a purchase of
|
|
9
|
+
Adds a purchase of the given item made by the given user.
|
|
10
10
|
|
|
11
11
|
Required parameters:
|
|
12
12
|
|
|
@@ -21,11 +21,11 @@ class AddPurchase(Request):
|
|
|
21
21
|
|
|
22
22
|
:param cascade_create: Sets whether the given user/item should be created if not present in the database.
|
|
23
23
|
|
|
24
|
-
:param amount: Amount (number) of purchased items. The default is 1. For example if `user-x` purchases two `item-y` during a single order (session...), the `amount` should equal
|
|
24
|
+
:param amount: Amount (number) of purchased items. The default is 1. For example, if `user-x` purchases two `item-y` during a single order (session...), the `amount` should equal 2.
|
|
25
25
|
|
|
26
|
-
:param price: Price paid by the user for the item. If `amount` is greater than 1, sum of prices of all the items should be given.
|
|
26
|
+
:param price: Price paid by the user for the item. If `amount` is greater than 1, the sum of prices of all the items should be given.
|
|
27
27
|
|
|
28
|
-
:param profit: Your profit from the purchased item. The profit is natural in e-commerce domain (for example if `user-x` purchases `item-y` for $100 and the gross margin is 30 %, then the profit is $30)
|
|
28
|
+
:param profit: Your profit from the purchased item. The profit is natural in the e-commerce domain (for example, if `user-x` purchases `item-y` for $100 and the gross margin is 30 %, then the profit is $30) but is also applicable in other domains (for example, at a news company it may be income from a displayed advertisement on article page). If `amount` is greater than 1, the sum of profit of all the items should be given.
|
|
29
29
|
|
|
30
30
|
:param recomm_id: If this purchase is based on a recommendation request, `recommId` is the id of the clicked recommendation.
|
|
31
31
|
|
|
@@ -35,7 +35,7 @@ class AddPurchase(Request):
|
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
37
|
def __init__(self, user_id: str, item_id: str, timestamp: Union[str, int] = DEFAULT, cascade_create: bool = DEFAULT, amount: float = DEFAULT, price: float = DEFAULT, profit: float = DEFAULT, recomm_id: str = DEFAULT, additional_data: dict = DEFAULT):
|
|
38
|
-
super().__init__(path="/purchases/"
|
|
38
|
+
super().__init__(path="/purchases/", method='post', timeout=3000, ensure_https=False)
|
|
39
39
|
self.user_id = user_id
|
|
40
40
|
self.item_id = item_id
|
|
41
41
|
self.timestamp = timestamp
|
|
@@ -6,7 +6,7 @@ DEFAULT = uuid.uuid4()
|
|
|
6
6
|
|
|
7
7
|
class AddRating(Request):
|
|
8
8
|
"""
|
|
9
|
-
Adds a rating of given item made by
|
|
9
|
+
Adds a rating of the given item made by the given user.
|
|
10
10
|
|
|
11
11
|
Required parameters:
|
|
12
12
|
|
|
@@ -31,7 +31,7 @@ class AddRating(Request):
|
|
|
31
31
|
"""
|
|
32
32
|
|
|
33
33
|
def __init__(self, user_id: str, item_id: str, rating: float, timestamp: Union[str, int] = DEFAULT, cascade_create: bool = DEFAULT, recomm_id: str = DEFAULT, additional_data: dict = DEFAULT):
|
|
34
|
-
super().__init__(path="/ratings/"
|
|
34
|
+
super().__init__(path="/ratings/", method='post', timeout=3000, ensure_https=False)
|
|
35
35
|
self.user_id = user_id
|
|
36
36
|
self.item_id = item_id
|
|
37
37
|
self.rating = rating
|
|
@@ -32,7 +32,7 @@ class AddSearchSynonym(Request):
|
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
34
|
def __init__(self, term: str, synonym: str, one_way: bool = DEFAULT):
|
|
35
|
-
super().__init__(path="/synonyms/items/"
|
|
35
|
+
super().__init__(path="/synonyms/items/", method='post', timeout=10000, ensure_https=False)
|
|
36
36
|
self.term = term
|
|
37
37
|
self.synonym = synonym
|
|
38
38
|
self.one_way = one_way
|
|
@@ -6,23 +6,31 @@ DEFAULT = uuid.uuid4()
|
|
|
6
6
|
|
|
7
7
|
class AddSeries(Request):
|
|
8
8
|
"""
|
|
9
|
-
Creates new series in the database.
|
|
9
|
+
Creates a new series in the database.
|
|
10
10
|
Required parameters:
|
|
11
11
|
|
|
12
12
|
:param series_id: ID of the series to be created.
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
Optional parameters:
|
|
16
|
+
|
|
17
|
+
:param cascade_create: If set to `true`, the item will be created with the same ID as the series. Default is `true`.
|
|
18
|
+
|
|
14
19
|
|
|
15
20
|
"""
|
|
16
21
|
|
|
17
|
-
def __init__(self, series_id: str):
|
|
18
|
-
super().__init__(path="/series/%s" % (series_id), method='put', timeout=
|
|
22
|
+
def __init__(self, series_id: str, cascade_create: bool = DEFAULT):
|
|
23
|
+
super().__init__(path="/series/%s" % (series_id), method='put', timeout=3000, ensure_https=False)
|
|
19
24
|
self.series_id = series_id
|
|
25
|
+
self.cascade_create = cascade_create
|
|
20
26
|
|
|
21
27
|
def get_body_parameters(self) -> dict:
|
|
22
28
|
"""
|
|
23
29
|
Values of body parameters as a dictionary (name of parameter: value of the parameter).
|
|
24
30
|
"""
|
|
25
31
|
p = dict()
|
|
32
|
+
if self.cascade_create is not DEFAULT:
|
|
33
|
+
p['cascadeCreate'] = self.cascade_create
|
|
26
34
|
return p
|
|
27
35
|
|
|
28
36
|
def get_query_parameters(self) -> dict:
|
{recombee-api-client-4.0.0 → recombee-api-client-5.0.0}/recombee_api_client/api_requests/add_user.py
RENAMED
|
@@ -16,7 +16,7 @@ class AddUser(Request):
|
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
18
|
def __init__(self, user_id: str):
|
|
19
|
-
super().__init__(path="/users/%s" % (user_id), method='put', timeout=
|
|
19
|
+
super().__init__(path="/users/%s" % (user_id), method='put', timeout=3000, ensure_https=False)
|
|
20
20
|
self.user_id = user_id
|
|
21
21
|
|
|
22
22
|
def get_body_parameters(self) -> dict:
|
|
@@ -6,11 +6,11 @@ DEFAULT = uuid.uuid4()
|
|
|
6
6
|
|
|
7
7
|
class AddUserProperty(Request):
|
|
8
8
|
"""
|
|
9
|
-
Adding
|
|
9
|
+
Adding a user property is somewhat equivalent to adding a column to the table of users. The users may be characterized by various properties of different types.
|
|
10
10
|
|
|
11
11
|
Required parameters:
|
|
12
12
|
|
|
13
|
-
:param property_name: Name of the user property to be created. Currently, the following names are reserved
|
|
13
|
+
:param property_name: Name of the user property to be created. Currently, the following names are reserved: `id`, `userid`, case-insensitively. Also, the length of the property name must not exceed 63 characters.
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
:param type: Value type of the user property to be created. One of: `int`, `double`, `string`, `boolean`, `timestamp`, `set`.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from recombee_api_client.api_requests.request import Request
|
|
2
|
+
from typing import Union, List
|
|
3
|
+
import uuid
|
|
4
|
+
|
|
5
|
+
DEFAULT = uuid.uuid4()
|
|
6
|
+
|
|
7
|
+
class CreateAutoReqlSegmentation(Request):
|
|
8
|
+
"""
|
|
9
|
+
Segment the items using a [ReQL](https://docs.recombee.com/reql.html) expression.
|
|
10
|
+
|
|
11
|
+
For each item, the expression should return a set that contains IDs of segments to which the item belongs to.
|
|
12
|
+
|
|
13
|
+
Required parameters:
|
|
14
|
+
|
|
15
|
+
:param segmentation_id: ID of the newly created Segmentation
|
|
16
|
+
|
|
17
|
+
:param source_type: What type of data should be segmented. Currently only `items` are supported.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
:param expression: ReQL expression that returns for each item a set with IDs of segments to which the item belongs
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
Optional parameters:
|
|
25
|
+
|
|
26
|
+
:param title: Human-readable name that is shown in the Recombee Admin UI.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
:param description: Description that is shown in the Recombee Admin UI.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__(self, segmentation_id: str, source_type: str, expression: str, title: str = DEFAULT, description: str = DEFAULT):
|
|
36
|
+
super().__init__(path="/segmentations/auto-reql/%s" % (segmentation_id), method='put', timeout=10000, ensure_https=False)
|
|
37
|
+
self.segmentation_id = segmentation_id
|
|
38
|
+
self.source_type = source_type
|
|
39
|
+
self.expression = expression
|
|
40
|
+
self.title = title
|
|
41
|
+
self.description = description
|
|
42
|
+
|
|
43
|
+
def get_body_parameters(self) -> dict:
|
|
44
|
+
"""
|
|
45
|
+
Values of body parameters as a dictionary (name of parameter: value of the parameter).
|
|
46
|
+
"""
|
|
47
|
+
p = dict()
|
|
48
|
+
p['sourceType'] = self.source_type
|
|
49
|
+
p['expression'] = self.expression
|
|
50
|
+
if self.title is not DEFAULT:
|
|
51
|
+
p['title'] = self.title
|
|
52
|
+
if self.description is not DEFAULT:
|
|
53
|
+
p['description'] = self.description
|
|
54
|
+
return p
|
|
55
|
+
|
|
56
|
+
def get_query_parameters(self) -> dict:
|
|
57
|
+
"""
|
|
58
|
+
Values of query parameters as a dictionary (name of parameter: value of the parameter).
|
|
59
|
+
"""
|
|
60
|
+
params = dict()
|
|
61
|
+
return params
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
from recombee_api_client.api_requests.request import Request
|
|
2
|
+
from typing import Union, List
|
|
3
|
+
import uuid
|
|
4
|
+
|
|
5
|
+
DEFAULT = uuid.uuid4()
|
|
6
|
+
|
|
7
|
+
class CreateManualReqlSegmentation(Request):
|
|
8
|
+
"""
|
|
9
|
+
Segment the items using multiple [ReQL](https://docs.recombee.com/reql.html) filters.
|
|
10
|
+
|
|
11
|
+
Use the Add Manual ReQL Items Segment endpoint to create the individual segments.
|
|
12
|
+
|
|
13
|
+
Required parameters:
|
|
14
|
+
|
|
15
|
+
:param segmentation_id: ID of the newly created Segmentation
|
|
16
|
+
|
|
17
|
+
:param source_type: What type of data should be segmented. Currently only `items` are supported.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Optional parameters:
|
|
22
|
+
|
|
23
|
+
:param title: Human-readable name that is shown in the Recombee Admin UI.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
:param description: Description that is shown in the Recombee Admin UI.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
def __init__(self, segmentation_id: str, source_type: str, title: str = DEFAULT, description: str = DEFAULT):
|
|
33
|
+
super().__init__(path="/segmentations/manual-reql/%s" % (segmentation_id), method='put', timeout=10000, ensure_https=False)
|
|
34
|
+
self.segmentation_id = segmentation_id
|
|
35
|
+
self.source_type = source_type
|
|
36
|
+
self.title = title
|
|
37
|
+
self.description = description
|
|
38
|
+
|
|
39
|
+
def get_body_parameters(self) -> dict:
|
|
40
|
+
"""
|
|
41
|
+
Values of body parameters as a dictionary (name of parameter: value of the parameter).
|
|
42
|
+
"""
|
|
43
|
+
p = dict()
|
|
44
|
+
p['sourceType'] = self.source_type
|
|
45
|
+
if self.title is not DEFAULT:
|
|
46
|
+
p['title'] = self.title
|
|
47
|
+
if self.description is not DEFAULT:
|
|
48
|
+
p['description'] = self.description
|
|
49
|
+
return p
|
|
50
|
+
|
|
51
|
+
def get_query_parameters(self) -> dict:
|
|
52
|
+
"""
|
|
53
|
+
Values of query parameters as a dictionary (name of parameter: value of the parameter).
|
|
54
|
+
"""
|
|
55
|
+
params = dict()
|
|
56
|
+
return params
|