mixpeek 0.1.2__tar.gz → 0.3__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 (189) hide show
  1. mixpeek-0.3/LICENSE.rst +20 -0
  2. mixpeek-0.3/MANIFEST.in +1 -0
  3. mixpeek-0.3/PKG-INFO +11 -0
  4. mixpeek-0.3/README.md +196 -0
  5. mixpeek-0.3/mixpeek/__init__.py +73 -0
  6. mixpeek-0.3/mixpeek.egg-info/PKG-INFO +11 -0
  7. mixpeek-0.3/mixpeek.egg-info/SOURCES.txt +12 -0
  8. mixpeek-0.3/mixpeek.egg-info/dependency_links.txt +1 -0
  9. mixpeek-0.3/mixpeek.egg-info/requires.txt +1 -0
  10. mixpeek-0.3/mixpeek.egg-info/top_level.txt +1 -0
  11. mixpeek-0.3/pyproject.toml +19 -0
  12. mixpeek-0.3/setup.cfg +8 -0
  13. mixpeek-0.3/setup.py +15 -0
  14. mixpeek-0.1.2/PKG-INFO +0 -439
  15. mixpeek-0.1.2/README-PYPI.md +0 -415
  16. mixpeek-0.1.2/py.typed +0 -1
  17. mixpeek-0.1.2/pyproject.toml +0 -55
  18. mixpeek-0.1.2/src/mixpeek/__init__.py +0 -9
  19. mixpeek-0.1.2/src/mixpeek/_hooks/__init__.py +0 -5
  20. mixpeek-0.1.2/src/mixpeek/_hooks/registration.py +0 -13
  21. mixpeek-0.1.2/src/mixpeek/_hooks/sdkhooks.py +0 -76
  22. mixpeek-0.1.2/src/mixpeek/_hooks/types.py +0 -94
  23. mixpeek-0.1.2/src/mixpeek/_version.py +0 -12
  24. mixpeek-0.1.2/src/mixpeek/assets.py +0 -1561
  25. mixpeek-0.1.2/src/mixpeek/basesdk.py +0 -350
  26. mixpeek-0.1.2/src/mixpeek/collections.py +0 -1029
  27. mixpeek-0.1.2/src/mixpeek/featureextractors.py +0 -205
  28. mixpeek-0.1.2/src/mixpeek/features.py +0 -1181
  29. mixpeek-0.1.2/src/mixpeek/health.py +0 -167
  30. mixpeek-0.1.2/src/mixpeek/httpclient.py +0 -84
  31. mixpeek-0.1.2/src/mixpeek/ingest.py +0 -831
  32. mixpeek-0.1.2/src/mixpeek/interactions.py +0 -221
  33. mixpeek-0.1.2/src/mixpeek/models/__init__.py +0 -751
  34. mixpeek-0.1.2/src/mixpeek/models/actionusage.py +0 -16
  35. mixpeek-0.1.2/src/mixpeek/models/apierror.py +0 -22
  36. mixpeek-0.1.2/src/mixpeek/models/apikey.py +0 -25
  37. mixpeek-0.1.2/src/mixpeek/models/apikeyupdate.py +0 -49
  38. mixpeek-0.1.2/src/mixpeek/models/assetfeatures.py +0 -55
  39. mixpeek-0.1.2/src/mixpeek/models/assetresponse.py +0 -166
  40. mixpeek-0.1.2/src/mixpeek/models/assets_model_searchquery.py +0 -21
  41. mixpeek-0.1.2/src/mixpeek/models/assetupdate.py +0 -28
  42. mixpeek-0.1.2/src/mixpeek/models/availableindexesresponse.py +0 -23
  43. mixpeek-0.1.2/src/mixpeek/models/availablemodels.py +0 -12
  44. mixpeek-0.1.2/src/mixpeek/models/boolindexparams.py +0 -18
  45. mixpeek-0.1.2/src/mixpeek/models/collectionmodel.py +0 -70
  46. mixpeek-0.1.2/src/mixpeek/models/collectionresult.py +0 -73
  47. mixpeek-0.1.2/src/mixpeek/models/create_api_key_organizations_users_user_email_api_keys_postop.py +0 -23
  48. mixpeek-0.1.2/src/mixpeek/models/create_collection_collections_postop.py +0 -62
  49. mixpeek-0.1.2/src/mixpeek/models/create_interaction_features_search_interactions_postop.py +0 -59
  50. mixpeek-0.1.2/src/mixpeek/models/createcollectionrequest.py +0 -59
  51. mixpeek-0.1.2/src/mixpeek/models/createnamespacerequest.py +0 -62
  52. mixpeek-0.1.2/src/mixpeek/models/datetimeindexparams.py +0 -18
  53. mixpeek-0.1.2/src/mixpeek/models/dateusage.py +0 -22
  54. mixpeek-0.1.2/src/mixpeek/models/db_model_paginationresponse.py +0 -59
  55. mixpeek-0.1.2/src/mixpeek/models/db_model_taskresponse.py +0 -20
  56. mixpeek-0.1.2/src/mixpeek/models/delete_api_key_organizations_users_user_email_api_keys_key_name_deleteop.py +0 -23
  57. mixpeek-0.1.2/src/mixpeek/models/delete_asset_assets_asset_id_deleteop.py +0 -57
  58. mixpeek-0.1.2/src/mixpeek/models/delete_collection_collections_collection_deleteop.py +0 -59
  59. mixpeek-0.1.2/src/mixpeek/models/delete_feature_features_feature_id_deleteop.py +0 -57
  60. mixpeek-0.1.2/src/mixpeek/models/delete_interaction_features_search_interactions_interaction_id_deleteop.py +0 -59
  61. mixpeek-0.1.2/src/mixpeek/models/delete_namespace_namespaces_namespace_deleteop.py +0 -18
  62. mixpeek-0.1.2/src/mixpeek/models/delete_user_organizations_users_user_email_deleteop.py +0 -16
  63. mixpeek-0.1.2/src/mixpeek/models/denseembedding.py +0 -16
  64. mixpeek-0.1.2/src/mixpeek/models/embeddingrequest.py +0 -59
  65. mixpeek-0.1.2/src/mixpeek/models/embeddingresponse.py +0 -64
  66. mixpeek-0.1.2/src/mixpeek/models/errormessage.py +0 -13
  67. mixpeek-0.1.2/src/mixpeek/models/errorresponse.py +0 -21
  68. mixpeek-0.1.2/src/mixpeek/models/facedetectsettings.py +0 -52
  69. mixpeek-0.1.2/src/mixpeek/models/featureextractionembeddingrequest.py +0 -54
  70. mixpeek-0.1.2/src/mixpeek/models/featureresponse.py +0 -74
  71. mixpeek-0.1.2/src/mixpeek/models/features_model_paginationresponse.py +0 -59
  72. mixpeek-0.1.2/src/mixpeek/models/featureupdaterequest.py +0 -21
  73. mixpeek-0.1.2/src/mixpeek/models/filtercondition.py +0 -74
  74. mixpeek-0.1.2/src/mixpeek/models/floatindexparams.py +0 -18
  75. mixpeek-0.1.2/src/mixpeek/models/full_asset_update_assets_asset_id_putop.py +0 -69
  76. mixpeek-0.1.2/src/mixpeek/models/full_feature_update_features_feature_id_putop.py +0 -69
  77. mixpeek-0.1.2/src/mixpeek/models/geoindexparams.py +0 -18
  78. mixpeek-0.1.2/src/mixpeek/models/get_asset_assets_asset_id_getop.py +0 -73
  79. mixpeek-0.1.2/src/mixpeek/models/get_asset_with_features_assets_asset_id_features_getop.py +0 -73
  80. mixpeek-0.1.2/src/mixpeek/models/get_collection_collections_collection_getop.py +0 -59
  81. mixpeek-0.1.2/src/mixpeek/models/get_feature_features_feature_id_getop.py +0 -70
  82. mixpeek-0.1.2/src/mixpeek/models/get_interaction_features_search_interactions_interaction_id_getop.py +0 -59
  83. mixpeek-0.1.2/src/mixpeek/models/get_namespace_namespaces_namespace_getop.py +0 -18
  84. mixpeek-0.1.2/src/mixpeek/models/get_task_tasks_task_id_getop.py +0 -57
  85. mixpeek-0.1.2/src/mixpeek/models/get_user_organizations_users_user_email_getop.py +0 -16
  86. mixpeek-0.1.2/src/mixpeek/models/groupbyoptions.py +0 -71
  87. mixpeek-0.1.2/src/mixpeek/models/groupbyoptionsasset.py +0 -71
  88. mixpeek-0.1.2/src/mixpeek/models/groupedassetdata.py +0 -18
  89. mixpeek-0.1.2/src/mixpeek/models/healthcheckresponse.py +0 -13
  90. mixpeek-0.1.2/src/mixpeek/models/httpvalidationerror.py +0 -21
  91. mixpeek-0.1.2/src/mixpeek/models/imagedescribesettings.py +0 -82
  92. mixpeek-0.1.2/src/mixpeek/models/imagedetectsettings.py +0 -53
  93. mixpeek-0.1.2/src/mixpeek/models/imagereadsettings.py +0 -71
  94. mixpeek-0.1.2/src/mixpeek/models/imagesettings.py +0 -79
  95. mixpeek-0.1.2/src/mixpeek/models/ingest_image_url_ingest_images_url_postop.py +0 -59
  96. mixpeek-0.1.2/src/mixpeek/models/ingest_text_ingest_text_postop.py +0 -59
  97. mixpeek-0.1.2/src/mixpeek/models/ingest_video_url_ingest_videos_url_postop.py +0 -59
  98. mixpeek-0.1.2/src/mixpeek/models/inputtype.py +0 -11
  99. mixpeek-0.1.2/src/mixpeek/models/integerindexparams.py +0 -24
  100. mixpeek-0.1.2/src/mixpeek/models/interactionresponse.py +0 -87
  101. mixpeek-0.1.2/src/mixpeek/models/interactiontype.py +0 -11
  102. mixpeek-0.1.2/src/mixpeek/models/jsonimageoutputsettings.py +0 -55
  103. mixpeek-0.1.2/src/mixpeek/models/jsontextoutputsettings.py +0 -55
  104. mixpeek-0.1.2/src/mixpeek/models/jsonvideooutputsettings.py +0 -55
  105. mixpeek-0.1.2/src/mixpeek/models/keywordindexparams.py +0 -21
  106. mixpeek-0.1.2/src/mixpeek/models/kill_task_tasks_task_id_deleteop.py +0 -57
  107. mixpeek-0.1.2/src/mixpeek/models/list_assets_assets_postop.py +0 -77
  108. mixpeek-0.1.2/src/mixpeek/models/list_collections_collections_getop.py +0 -65
  109. mixpeek-0.1.2/src/mixpeek/models/list_features_features_postop.py +0 -79
  110. mixpeek-0.1.2/src/mixpeek/models/list_interactions_features_search_interactions_getop.py +0 -96
  111. mixpeek-0.1.2/src/mixpeek/models/listassetsrequest.py +0 -75
  112. mixpeek-0.1.2/src/mixpeek/models/listassetsresponse.py +0 -22
  113. mixpeek-0.1.2/src/mixpeek/models/listcollectionsresponse.py +0 -22
  114. mixpeek-0.1.2/src/mixpeek/models/listfeaturesrequest.py +0 -77
  115. mixpeek-0.1.2/src/mixpeek/models/listfeaturesresponse.py +0 -22
  116. mixpeek-0.1.2/src/mixpeek/models/logicaloperator_input.py +0 -88
  117. mixpeek-0.1.2/src/mixpeek/models/logicaloperator_output.py +0 -103
  118. mixpeek-0.1.2/src/mixpeek/models/logodetectsettings.py +0 -52
  119. mixpeek-0.1.2/src/mixpeek/models/modality.py +0 -13
  120. mixpeek-0.1.2/src/mixpeek/models/modeldetails.py +0 -57
  121. mixpeek-0.1.2/src/mixpeek/models/namespaceresponse.py +0 -54
  122. mixpeek-0.1.2/src/mixpeek/models/organizationmodel.py +0 -45
  123. mixpeek-0.1.2/src/mixpeek/models/partial_asset_update_assets_asset_id_patchop.py +0 -69
  124. mixpeek-0.1.2/src/mixpeek/models/payloadindexconfig.py +0 -94
  125. mixpeek-0.1.2/src/mixpeek/models/payloadindextype.py +0 -17
  126. mixpeek-0.1.2/src/mixpeek/models/payloadschematype.py +0 -15
  127. mixpeek-0.1.2/src/mixpeek/models/percolaterequest.py +0 -57
  128. mixpeek-0.1.2/src/mixpeek/models/permission.py +0 -10
  129. mixpeek-0.1.2/src/mixpeek/models/processimageurlinput.py +0 -99
  130. mixpeek-0.1.2/src/mixpeek/models/processtextinput.py +0 -94
  131. mixpeek-0.1.2/src/mixpeek/models/processvideourlinput.py +0 -99
  132. mixpeek-0.1.2/src/mixpeek/models/querysettings.py +0 -56
  133. mixpeek-0.1.2/src/mixpeek/models/rerankingoptions.py +0 -47
  134. mixpeek-0.1.2/src/mixpeek/models/search_assets_assets_search_postop.py +0 -59
  135. mixpeek-0.1.2/src/mixpeek/models/search_features_features_search_postop.py +0 -96
  136. mixpeek-0.1.2/src/mixpeek/models/search_model_searchquery_input.py +0 -76
  137. mixpeek-0.1.2/src/mixpeek/models/searchassetsrequest.py +0 -78
  138. mixpeek-0.1.2/src/mixpeek/models/searchinteraction.py +0 -82
  139. mixpeek-0.1.2/src/mixpeek/models/searchquery_output.py +0 -79
  140. mixpeek-0.1.2/src/mixpeek/models/searchrequestfeatures_input.py +0 -151
  141. mixpeek-0.1.2/src/mixpeek/models/searchrequestfeatures_output.py +0 -151
  142. mixpeek-0.1.2/src/mixpeek/models/sortoption.py +0 -28
  143. mixpeek-0.1.2/src/mixpeek/models/sparseembedding.py +0 -21
  144. mixpeek-0.1.2/src/mixpeek/models/tasks_model_taskresponse.py +0 -24
  145. mixpeek-0.1.2/src/mixpeek/models/taskstatus.py +0 -16
  146. mixpeek-0.1.2/src/mixpeek/models/textindexparams.py +0 -31
  147. mixpeek-0.1.2/src/mixpeek/models/textsettings.py +0 -61
  148. mixpeek-0.1.2/src/mixpeek/models/tokenizertype.py +0 -11
  149. mixpeek-0.1.2/src/mixpeek/models/update_api_key_organizations_users_user_email_api_keys_key_name_patchop.py +0 -30
  150. mixpeek-0.1.2/src/mixpeek/models/update_collection_collections_collection_putop.py +0 -74
  151. mixpeek-0.1.2/src/mixpeek/models/update_namespace_namespaces_namespace_putop.py +0 -28
  152. mixpeek-0.1.2/src/mixpeek/models/updateassetrequest.py +0 -60
  153. mixpeek-0.1.2/src/mixpeek/models/updatenamespacerequest.py +0 -26
  154. mixpeek-0.1.2/src/mixpeek/models/usage.py +0 -18
  155. mixpeek-0.1.2/src/mixpeek/models/usermodel_input.py +0 -36
  156. mixpeek-0.1.2/src/mixpeek/models/usermodel_output.py +0 -36
  157. mixpeek-0.1.2/src/mixpeek/models/uuidindexparams.py +0 -21
  158. mixpeek-0.1.2/src/mixpeek/models/validationerror.py +0 -26
  159. mixpeek-0.1.2/src/mixpeek/models/vectormodel.py +0 -11
  160. mixpeek-0.1.2/src/mixpeek/models/vectortype.py +0 -9
  161. mixpeek-0.1.2/src/mixpeek/models/videodescribesettings.py +0 -82
  162. mixpeek-0.1.2/src/mixpeek/models/videodetectsettings.py +0 -53
  163. mixpeek-0.1.2/src/mixpeek/models/videoreadsettings.py +0 -71
  164. mixpeek-0.1.2/src/mixpeek/models/videosettings.py +0 -101
  165. mixpeek-0.1.2/src/mixpeek/models/videotranscriptionsettings.py +0 -69
  166. mixpeek-0.1.2/src/mixpeek/namespaces.py +0 -1143
  167. mixpeek-0.1.2/src/mixpeek/organizations.py +0 -1508
  168. mixpeek-0.1.2/src/mixpeek/py.typed +0 -1
  169. mixpeek-0.1.2/src/mixpeek/sdk.py +0 -135
  170. mixpeek-0.1.2/src/mixpeek/sdkconfiguration.py +0 -45
  171. mixpeek-0.1.2/src/mixpeek/searchinteractions.py +0 -647
  172. mixpeek-0.1.2/src/mixpeek/tasks.py +0 -387
  173. mixpeek-0.1.2/src/mixpeek/types/__init__.py +0 -21
  174. mixpeek-0.1.2/src/mixpeek/types/basemodel.py +0 -39
  175. mixpeek-0.1.2/src/mixpeek/utils/__init__.py +0 -97
  176. mixpeek-0.1.2/src/mixpeek/utils/annotations.py +0 -55
  177. mixpeek-0.1.2/src/mixpeek/utils/enums.py +0 -34
  178. mixpeek-0.1.2/src/mixpeek/utils/eventstreaming.py +0 -238
  179. mixpeek-0.1.2/src/mixpeek/utils/forms.py +0 -202
  180. mixpeek-0.1.2/src/mixpeek/utils/headers.py +0 -136
  181. mixpeek-0.1.2/src/mixpeek/utils/logger.py +0 -27
  182. mixpeek-0.1.2/src/mixpeek/utils/metadata.py +0 -118
  183. mixpeek-0.1.2/src/mixpeek/utils/queryparams.py +0 -205
  184. mixpeek-0.1.2/src/mixpeek/utils/requestbodies.py +0 -66
  185. mixpeek-0.1.2/src/mixpeek/utils/retries.py +0 -217
  186. mixpeek-0.1.2/src/mixpeek/utils/security.py +0 -174
  187. mixpeek-0.1.2/src/mixpeek/utils/serializers.py +0 -215
  188. mixpeek-0.1.2/src/mixpeek/utils/url.py +0 -155
  189. mixpeek-0.1.2/src/mixpeek/utils/values.py +0 -134
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+ Copyright (c) 2021 mixpeek
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
20
+ OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ include homograph/homographs.json
mixpeek-0.3/PKG-INFO ADDED
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.1
2
+ Name: mixpeek
3
+ Version: 0.3
4
+ Summary: full-text file search API
5
+ Home-page: https://github.com/mixpeek/mixpeek-python
6
+ Author: Ethan Steininger
7
+ Author-email: info@mixpeek.com
8
+ License: MIT
9
+ Keywords: file search
10
+ License-File: LICENSE.rst
11
+ Requires-Dist: requests
mixpeek-0.3/README.md ADDED
@@ -0,0 +1,196 @@
1
+ # Mixpeek
2
+
3
+ Mixpeek let's you run full-text-search on your files
4
+
5
+ **Stuff you might be looking for**:
6
+
7
+ - [API Documentation](https://docs.mixpeek.com)
8
+ - [Installing Mixpeek](https://github.com/mixpeek/mixpeek-python#installation)
9
+ - [S3 Support](https://github.com/mixpeek/mixpeek-python#s3-support)
10
+ - [Bugs & Questions](https://github.com/mixpeek/mixpeek-python#bugs-&-questions)
11
+
12
+ ## Quickstart
13
+
14
+ Upload any filetype from the supported filetype [list here](https://mixpeek.com/learn)
15
+
16
+ ```python
17
+ from mixpeek import Mixpeek
18
+
19
+ mix = Mixpeek(api_key="API_KEY")
20
+
21
+ # index one local pdf document without any extra metadata
22
+ mix.index("/user/desktop/file.pdf")
23
+
24
+ # with extra metadata
25
+ mix.index(
26
+ "/user/desktop/file.pdf",
27
+ user_id="123",
28
+ tags="document, legal",
29
+ static_file_url="cdn.host.com/file.pdf",
30
+ save=True,
31
+ description="this is a cat"
32
+ )
33
+ ```
34
+
35
+ ...or any audio filetype
36
+
37
+ ```python
38
+ mix.index("/user/desktop/never_gonna_give_you_up.mp3")
39
+ ```
40
+
41
+ ... or an image, video, document or [anything else mixpeek supports](https://mixpeek.com/learn)
42
+
43
+ ```python
44
+ video = mix.index("/user/desktop/video.avi")
45
+ image = mix.index("/user/desktop/image.png")
46
+ markdown = mix.index("/user/desktop/markdown.md")
47
+ ```
48
+
49
+ The API will return the `file_id`, be sure to store this:
50
+
51
+ ```python
52
+ # response
53
+ {
54
+ "file_id": "63a32cca0de5e4ce354a4b1c"
55
+ }
56
+ ```
57
+
58
+ Now you can search across all your files:
59
+
60
+ ```python
61
+ mix.search(query="let you down")
62
+
63
+ # response
64
+ [
65
+ {
66
+ "file_id": "6377c98b3c4f239f17663d79",
67
+ "filename": "prescription.pdf",
68
+ "importance": "100%",
69
+ "static_file_url": "s3://audio.mp3"
70
+ }
71
+ ]
72
+
73
+ ```
74
+
75
+ And you can include other parameters in your search query:
76
+
77
+ ```python
78
+ mix.search(
79
+ "readme",
80
+ user_id="john_smith_123",
81
+ context="true",
82
+ tags="legal, document"
83
+ )
84
+
85
+ # response
86
+ [
87
+ {
88
+ "file_id": "63a32cd70de5e4ce354a4b1f",
89
+ "filename": "system-design-primer.md",
90
+ "static_file_url": "s3://audio.mp3",
91
+ "user_id": "john_smith_123",
92
+ "tags":["legal", "document"],
93
+ "highlights": [
94
+ {
95
+ "texts": [
96
+ {
97
+ "type": "text",
98
+ "value": "- What is the expected "
99
+ },
100
+ {
101
+ "type": "hit",
102
+ "value": "read"
103
+ },
104
+ {
105
+ "type": "text",
106
+ "value": " to write ratio?\n\n"
107
+ }
108
+ ]
109
+ }
110
+ ],
111
+ "importance": "100%"
112
+ }
113
+ ]
114
+ ```
115
+
116
+ ## Installation
117
+
118
+ Installing mixpeek is easy
119
+
120
+ ```shell
121
+ pip install git+https://github.com/mixpeek/mixpeek-python.git@master
122
+ ```
123
+
124
+ ## S3 Support
125
+
126
+ Be sure you create an AWS access key/secret key combo with S3 bucket read permissions using [this guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
127
+
128
+ Files are never stored on our servers, review our [security principles](https://mixpeek.com/security).
129
+
130
+ ```python
131
+ from mixpeek import Mixpeek
132
+
133
+ mix = Mixpeek(
134
+ api_key="mixpeek_api_key",
135
+ access_key="aws_access_key",
136
+ secret_key="aws_secret_key",
137
+ region="region"
138
+ )
139
+
140
+ mix.index_bucket("mixpeek-public-demo")
141
+
142
+ # response (list of File_ids)
143
+
144
+ {
145
+ "file_ids": [
146
+ "63a33611660c021b50271666",
147
+ "63a33611660c021b50271667",
148
+ "63a33611660c021b50271668",
149
+ "63a33613660c021b50271669"
150
+ ]
151
+ }
152
+
153
+ ```
154
+
155
+ ## Bugs & Questions
156
+
157
+ If this was helpful, please upvote [this StackOverflow comment](https://stackoverflow.com/a/69475102/5956579)
158
+
159
+ You can file bugs in our [github issues tracker](https://github.com/mixpeek/mixpeek-python/issues),
160
+ and ask any technical questions on
161
+ [Stack Overflow using the mixpeek tag](http://stackoverflow.com/questions/ask?tags=mixpeek).
162
+ We keep an eye on both.
163
+
164
+ ## 🚀 Features
165
+
166
+ - Supports for `Python 3.8` and higher.
167
+ - Full text search
168
+ - AWS S3 Integration
169
+ - Fuzzy text matching
170
+
171
+ ## Articles:
172
+
173
+ [Learning Center](https://mixpeek.com/learn)
174
+
175
+ ## License ([MIT License](http://opensource.org/licenses/mit-license.php))
176
+
177
+ Copyright © 2022 Mixpeek, https://mixpeek.com
178
+
179
+ Permission is hereby granted, free of charge, to any person obtaining
180
+ a copy of this software and associated documentation files (the
181
+ "Software"), to deal in the Software without restriction, including
182
+ without limitation the rights to use, copy, modify, merge, publish,
183
+ distribute, sublicense, and/or sell copies of the Software, and to
184
+ permit persons to whom the Software is furnished to do so, subject to
185
+ the following conditions:
186
+
187
+ The above copyright notice and this permission notice shall be
188
+ included in all copies or substantial portions of the Software.
189
+
190
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
191
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
192
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
193
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
194
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
195
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
196
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,73 @@
1
+ # mixpeek.py
2
+ import requests
3
+ import json
4
+
5
+
6
+ class Mixpeek:
7
+ def __init__(self, api_key):
8
+ self.base_url = "https://api.mixpeek.com"
9
+ self.headers = {
10
+ "Authorization": f"Bearer {api_key}",
11
+ "Content-Type": "application/json",
12
+ }
13
+ self.generate = self.Generate(self)
14
+ self.parse = self.Parse(self)
15
+
16
+ def _send_post(self, url, payload):
17
+ return requests.post(url, headers=self.headers, data=json.dumps(payload)).json()
18
+
19
+ def _send_get(self, url):
20
+ return requests.get(url, headers=self.headers).json()
21
+
22
+ class Generate:
23
+ def __init__(self, mixpeek):
24
+ self.mixpeek = mixpeek
25
+ self.openai = self.OpenAI(self.mixpeek)
26
+
27
+ class OpenAI:
28
+ def __init__(self, mixpeek):
29
+ self.mixpeek = mixpeek
30
+ self.generate_openai_url = f"{self.mixpeek.base_url}/generate"
31
+
32
+ def _construct_request_format(
33
+ self, model, context, response_format, settings=None
34
+ ):
35
+ payload = {
36
+ "model": {"provider": "gpt", "model": model},
37
+ "context": context,
38
+ "messages": [{"role": "user", "content": ""}],
39
+ **settings,
40
+ }
41
+
42
+ if response_format is not None:
43
+ json_schema = response_format.model_json_schema()
44
+ payload["response_format"] = json_schema
45
+
46
+ return payload
47
+
48
+ def chat(self, model, response_format, context, settings=None):
49
+ payload = self._construct_request_format(
50
+ model, context, response_format, settings
51
+ )
52
+ return self.mixpeek._send_post(self.generate_openai_url, payload)
53
+
54
+ class Parse:
55
+ def __init__(self, mixpeek):
56
+ self.mixpeek = mixpeek
57
+ self.text = self.Text(self.mixpeek)
58
+
59
+ class Text:
60
+ def __init__(self, mixpeek):
61
+ self.mixpeek = mixpeek
62
+ self.parse_url = f"{self.mixpeek.base_url}/parsers"
63
+
64
+ def extract(self, file_url, should_chunk=True):
65
+ url = self.parse_url + "?should_chunk=" + str(should_chunk)
66
+ return self.mixpeek._send_post(url, {"file_url": file_url})
67
+
68
+ def chunk(self, corpus):
69
+ pass
70
+
71
+ class Index:
72
+ def __init__(self):
73
+ pass
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.1
2
+ Name: mixpeek
3
+ Version: 0.3
4
+ Summary: full-text file search API
5
+ Home-page: https://github.com/mixpeek/mixpeek-python
6
+ Author: Ethan Steininger
7
+ Author-email: info@mixpeek.com
8
+ License: MIT
9
+ Keywords: file search
10
+ License-File: LICENSE.rst
11
+ Requires-Dist: requests
@@ -0,0 +1,12 @@
1
+ LICENSE.rst
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ setup.cfg
6
+ setup.py
7
+ mixpeek/__init__.py
8
+ mixpeek.egg-info/PKG-INFO
9
+ mixpeek.egg-info/SOURCES.txt
10
+ mixpeek.egg-info/dependency_links.txt
11
+ mixpeek.egg-info/requires.txt
12
+ mixpeek.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ requests
@@ -0,0 +1 @@
1
+ mixpeek
@@ -0,0 +1,19 @@
1
+ [tool.poetry]
2
+ name = "mixpeek-python"
3
+ version = "0.1.0"
4
+ description = ""
5
+ authors = ["Ethan Steininger <esteininger21@gmail.com>"]
6
+ readme = "README.md"
7
+
8
+ [tool.poetry.dependencies]
9
+ python = "^3.11"
10
+ pydantic = "^2.6.4"
11
+ requests = "^2.31.0"
12
+ setuptools = "^69.2.0"
13
+ wheel = "^0.43.0"
14
+ twine = "^5.0.0"
15
+
16
+
17
+ [build-system]
18
+ requires = ["poetry-core"]
19
+ build-backend = "poetry.core.masonry.api"
mixpeek-0.3/setup.cfg ADDED
@@ -0,0 +1,8 @@
1
+ [metadata]
2
+ description-file = README.md
3
+ license_files = LICENSE.rst
4
+
5
+ [egg_info]
6
+ tag_build =
7
+ tag_date = 0
8
+
mixpeek-0.3/setup.py ADDED
@@ -0,0 +1,15 @@
1
+ from setuptools import setup, find_packages
2
+
3
+
4
+ setup(
5
+ name="mixpeek",
6
+ version="0.3",
7
+ license="MIT",
8
+ author="Ethan Steininger",
9
+ author_email="info@mixpeek.com",
10
+ packages=["mixpeek"],
11
+ url="https://github.com/mixpeek/mixpeek-python",
12
+ keywords="file search",
13
+ description="full-text file search API",
14
+ install_requires=["requests"],
15
+ )