mixpeek 0.2__py3-none-any.whl → 0.6.2__py3-none-any.whl

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 (81) hide show
  1. mixpeek/__init__.py +100 -71
  2. mixpeek/base_client.py +155 -0
  3. mixpeek/client.py +65 -0
  4. mixpeek/core/__init__.py +25 -0
  5. mixpeek/core/api_error.py +15 -0
  6. mixpeek/core/client_wrapper.py +83 -0
  7. mixpeek/core/datetime_utils.py +28 -0
  8. mixpeek/core/file.py +38 -0
  9. mixpeek/core/http_client.py +130 -0
  10. mixpeek/core/jsonable_encoder.py +103 -0
  11. mixpeek/core/remove_none_from_dict.py +11 -0
  12. mixpeek/core/request_options.py +32 -0
  13. mixpeek/embed/__init__.py +2 -0
  14. mixpeek/embed/client.py +350 -0
  15. mixpeek/environment.py +7 -0
  16. mixpeek/errors/__init__.py +17 -0
  17. mixpeek/errors/bad_request_error.py +9 -0
  18. mixpeek/errors/forbidden_error.py +9 -0
  19. mixpeek/errors/internal_server_error.py +9 -0
  20. mixpeek/errors/not_found_error.py +9 -0
  21. mixpeek/errors/unauthorized_error.py +9 -0
  22. mixpeek/errors/unprocessable_entity_error.py +9 -0
  23. mixpeek/extract/__init__.py +2 -0
  24. mixpeek/extract/client.py +347 -0
  25. mixpeek/generators/__init__.py +2 -0
  26. mixpeek/generators/client.py +237 -0
  27. mixpeek/parse/__init__.py +2 -0
  28. mixpeek/parse/client.py +111 -0
  29. mixpeek/parse_client.py +14 -0
  30. mixpeek/pipelines/__init__.py +2 -0
  31. mixpeek/pipelines/client.py +468 -0
  32. mixpeek/py.typed +0 -0
  33. mixpeek/storage/__init__.py +2 -0
  34. mixpeek/storage/client.py +250 -0
  35. mixpeek/types/__init__.py +73 -0
  36. mixpeek/types/api_key.py +31 -0
  37. mixpeek/types/audio_params.py +29 -0
  38. mixpeek/types/configs_response.py +31 -0
  39. mixpeek/types/connection.py +36 -0
  40. mixpeek/types/connection_engine.py +5 -0
  41. mixpeek/types/csv_params.py +29 -0
  42. mixpeek/types/destination.py +31 -0
  43. mixpeek/types/embedding_response.py +30 -0
  44. mixpeek/types/error_message.py +29 -0
  45. mixpeek/types/error_response.py +30 -0
  46. mixpeek/types/field_type.py +5 -0
  47. mixpeek/types/generation_response.py +34 -0
  48. mixpeek/types/html_params.py +29 -0
  49. mixpeek/types/http_validation_error.py +30 -0
  50. mixpeek/types/image_params.py +32 -0
  51. mixpeek/types/message.py +30 -0
  52. mixpeek/types/metadata.py +34 -0
  53. mixpeek/types/modality.py +5 -0
  54. mixpeek/types/model.py +31 -0
  55. mixpeek/types/models.py +5 -0
  56. mixpeek/types/pdf_params.py +41 -0
  57. mixpeek/types/ppt_params.py +27 -0
  58. mixpeek/types/pptx_params.py +27 -0
  59. mixpeek/types/settings.py +35 -0
  60. mixpeek/types/source.py +32 -0
  61. mixpeek/types/source_destination_mapping.py +33 -0
  62. mixpeek/types/txt_params.py +27 -0
  63. mixpeek/types/user.py +36 -0
  64. mixpeek/types/validation_error.py +32 -0
  65. mixpeek/types/validation_error_loc_item.py +5 -0
  66. mixpeek/types/video_params.py +27 -0
  67. mixpeek/types/workflow_response.py +32 -0
  68. mixpeek/types/workflow_settings.py +30 -0
  69. mixpeek/types/xlsx_params.py +29 -0
  70. mixpeek/users/__init__.py +2 -0
  71. mixpeek/users/client.py +308 -0
  72. mixpeek/version.py +4 -0
  73. mixpeek/workflows/__init__.py +2 -0
  74. mixpeek/workflows/client.py +536 -0
  75. mixpeek-0.2.dist-info/LICENSE.rst → mixpeek-0.6.2.dist-info/LICENSE +10 -9
  76. mixpeek-0.6.2.dist-info/METADATA +145 -0
  77. mixpeek-0.6.2.dist-info/RECORD +78 -0
  78. {mixpeek-0.2.dist-info → mixpeek-0.6.2.dist-info}/WHEEL +1 -2
  79. mixpeek-0.2.dist-info/METADATA +0 -12
  80. mixpeek-0.2.dist-info/RECORD +0 -6
  81. mixpeek-0.2.dist-info/top_level.txt +0 -1
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.1
2
+ Name: mixpeek
3
+ Version: 0.6.2
4
+ Summary:
5
+ Requires-Python: >=3.8,<4.0
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Python :: 3.8
8
+ Classifier: Programming Language :: Python :: 3.9
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Requires-Dist: httpx (>=0.21.2)
12
+ Requires-Dist: pydantic (>=1.9.2)
13
+ Requires-Dist: typing_extensions (>=4.0.0)
14
+ Description-Content-Type: text/markdown
15
+
16
+ # Mixpeek Python Library
17
+
18
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)
19
+
20
+ The Mixpeek Python Library provides convenient access to the Mixpeek API from applications written in Python.
21
+
22
+ ## Installation
23
+ Add this dependency to your project's build file:
24
+
25
+ ```bash
26
+ pip install mixpeek
27
+ # or
28
+ poetry add mixpeek
29
+ ```
30
+
31
+ ## Usage
32
+ Simply import `Mixpeek` and start making calls to our API.
33
+
34
+ ```python
35
+ from mixpeek.client import Mixpeek
36
+
37
+ client = Mixpeek(
38
+ api_key="..."
39
+ )
40
+ ```
41
+
42
+ ## Async Client
43
+
44
+ The SDK also exports an async client so that you can make non-blocking
45
+ calls to our API.
46
+
47
+ ```python
48
+ from mixpeek.client import AsymcMixpeek
49
+
50
+ client = AsyncMixpeek(
51
+ api_key="..."
52
+ )
53
+ ```
54
+
55
+ ## Exception Handling
56
+ All errors thrown by the SDK will be subclasses of [`ApiError`](./src/mixpeek/core/api_error.py).
57
+
58
+ ```python
59
+ import mixpeek
60
+
61
+ try:
62
+ client.search(...)
63
+ except mixpeek.core.ApiError as e: # Handle all errors
64
+ print(e.status_code)
65
+ print(e.body)
66
+ ```
67
+
68
+ ## Advanced
69
+
70
+ ### Retries
71
+ The Mixpeek SDK is instrumented with automatic retries with exponential backoff. A request will be
72
+ retried as long as the request is deemed retriable and the number of retry attempts has not grown larger
73
+ than the configured retry limit.
74
+
75
+ A request is deemed retriable when any of the following HTTP status codes is returned:
76
+
77
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
78
+ - [409](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) (Conflict)
79
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
80
+ - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
81
+
82
+ Use the `max_retries` request option to configure this behavior.
83
+
84
+ ```python
85
+ from mixpeek.client import Mixpeek
86
+
87
+ client = Mixpeek(...)
88
+
89
+ # Override retries for a specific method
90
+ client.search(..., {
91
+ max_retries=5
92
+ })
93
+ ```
94
+
95
+ ### Timeouts
96
+ By default, requests time out after 60 seconds. You can configure this with a
97
+ timeout option at the client or request level.
98
+
99
+ ```python
100
+ from mixpeek.client import Mixpeek
101
+
102
+ client = Mixpeek(
103
+ # All timeouts are 20 seconds
104
+ timeout=20.0,
105
+ )
106
+
107
+ # Override timeout for a specific method
108
+ client.search(..., {
109
+ timeout_in_seconds=20.0
110
+ })
111
+ ```
112
+
113
+ ### Custom HTTP client
114
+ You can override the httpx client to customize it for your use-case. Some common use-cases
115
+ include support for proxies and transports.
116
+
117
+ ```python
118
+ import httpx
119
+
120
+ from mixpeek.client import Mixpeek
121
+
122
+ client = Mixpeek(
123
+ http_client=httpx.Client(
124
+ proxies="http://my.test.proxy.example.com",
125
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
126
+ ),
127
+ )
128
+ ```
129
+
130
+ ## Beta Status
131
+
132
+ This SDK is in beta, and there may be breaking changes between versions without a major
133
+ version update. Therefore, we recommend pinning the package version to a specific version.
134
+ This way, you can install the same version each time without breaking changes.
135
+
136
+ ## Contributing
137
+
138
+ While we value open-source contributions to this SDK, this library is generated programmatically.
139
+ Additions made directly to this library would have to be moved over to our generation code,
140
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
141
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
142
+ an issue first to discuss with us!
143
+
144
+ On the other hand, contributions to the README are always very welcome!
145
+
@@ -0,0 +1,78 @@
1
+ mixpeek/__init__.py,sha256=lUhNeNcGm17ibZbyMRdI-mRniA8Ez4Kl3te5eQfL6T8,2000
2
+ mixpeek/base_client.py,sha256=wl8CUr8zcD2DWTQ45MIiJ3aTbuEbkW4nwMRxLnwl1e0,7338
3
+ mixpeek/client.py,sha256=4FB09MxWYPm7ci7VBsuSYQvp-Fj6XWVaMmbcGg_J19o,2064
4
+ mixpeek/core/__init__.py,sha256=RWfyDqkzWsf8e3VGc3NV60MovfJbg5XWzNFGB2DZ0hA,790
5
+ mixpeek/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
6
+ mixpeek/core/client_wrapper.py,sha256=n0jL710h_e-Eheb8l0f5uGKnMI2xQzWJv7NAAAR2L-A,2622
7
+ mixpeek/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
8
+ mixpeek/core/file.py,sha256=sy1RUGZ3aJYuw998bZytxxo6QdgKmlnlgBaMvwEKCGg,1480
9
+ mixpeek/core/http_client.py,sha256=5ok6hqgZDJhg57EHvMnr0BBaHdG50QxFPKaCZ9aVWTc,5059
10
+ mixpeek/core/jsonable_encoder.py,sha256=IEhJedBpobt0zOfjW0pcH_sptQH3_frWtRF_s6i4HTM,3799
11
+ mixpeek/core/remove_none_from_dict.py,sha256=8m91FC3YuVem0Gm9_sXhJ2tGvP33owJJdrqCLEdowGw,330
12
+ mixpeek/core/request_options.py,sha256=-3QoOMMHI2exIyHH6Q2MD7rpo_6w-i6zMAy0nqWTN8c,1420
13
+ mixpeek/embed/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
14
+ mixpeek/embed/client.py,sha256=haXcK4uwxnelQEu_CKExZTxX8axjIoHESdENm711xWk,16086
15
+ mixpeek/environment.py,sha256=-muYBZQwCYNISO0ic3Kkn_hPqfrB_VpOv_RpBoCKA6Q,156
16
+ mixpeek/errors/__init__.py,sha256=whc3hN4Au19m_MxwQGjxUEfmSPyHqjmvOS0ESc0S7Qk,534
17
+ mixpeek/errors/bad_request_error.py,sha256=xHpPeLG8lM_kLR1QpOHI4xOuWVFEOgQfQi37kOcB0wc,285
18
+ mixpeek/errors/forbidden_error.py,sha256=CYoHSeucV5tjDJUTj19Dp6EoJZBvRswNAT9YhITApfE,284
19
+ mixpeek/errors/internal_server_error.py,sha256=fMmyOAEwUto7X9Mp65KbL0XkvepZsmT6p1p3hIBEuFg,289
20
+ mixpeek/errors/not_found_error.py,sha256=y5TwirUAu_TWO2d1Poh2ALf1IHj2v728z6AxrGexSVg,283
21
+ mixpeek/errors/unauthorized_error.py,sha256=nH-QOnS5KLta5PB4I-UoETY4i_Uz3-mF9xCwScE1JOE,287
22
+ mixpeek/errors/unprocessable_entity_error.py,sha256=FvR7XPlV3Xx5nu8HNlmLhBRdk4so_gCHjYT5PyZe6sM,313
23
+ mixpeek/extract/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
24
+ mixpeek/extract/client.py,sha256=qaslz87C5K3kh1CVL9VTuhgWgOKVWk8ctavYpkrqcDI,15158
25
+ mixpeek/generators/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
26
+ mixpeek/generators/client.py,sha256=SzB9kLokmXDOzPAfeQIbmrcMtXYDoJ4LqqGAY8ELkzo,10251
27
+ mixpeek/parse/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
28
+ mixpeek/parse/client.py,sha256=Zav85ROBG9jmhi6JKwy0FAcpvddGlwwE4uDv4dZ7o4c,4717
29
+ mixpeek/parse_client.py,sha256=yRhssnPCsjSKnS0LknhiYicAOuRcRnRVcn7iWaswQBU,279
30
+ mixpeek/pipelines/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
31
+ mixpeek/pipelines/client.py,sha256=giu5j2RBt4XbWWI4n9TBUxRUOEmsp1iDPSLU37utayg,22360
32
+ mixpeek/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ mixpeek/storage/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
34
+ mixpeek/storage/client.py,sha256=Ug_1zg0KF3lMT2JIipiryHB3dikitt7-GIVxrzdKQow,12609
35
+ mixpeek/types/__init__.py,sha256=frwgYFJuSzwu6UyATG--EvTATm81whup82khta72lFA,2060
36
+ mixpeek/types/api_key.py,sha256=DnZf9eer296hvfC5PK4Hcrg7-LywKA_fSn68aaMzf5U,1013
37
+ mixpeek/types/audio_params.py,sha256=3KowuNn3ClYTXWsFvKHd8XrR1G8hmydusRzQQ6cAp5I,939
38
+ mixpeek/types/configs_response.py,sha256=_gH6KyKLlC6CZcJeJYFO0ecr7QLSpmgKJqlqxiLcXCQ,959
39
+ mixpeek/types/connection.py,sha256=b2dw5xagRgTuGjBB_NSW0JsVeSWGiFwkM6-E3jQc9IA,1144
40
+ mixpeek/types/connection_engine.py,sha256=Gy43bjrZTkfiYtQQZGZFvJwHvHS0PxhZCf8l-LRrbRE,168
41
+ mixpeek/types/csv_params.py,sha256=Adc3qwAOGpvRRAu3iV6ObN5EbLPnzmsj8IxTyDc0ZCM,938
42
+ mixpeek/types/destination.py,sha256=bylFUTAdnonbUw_V1wBF4cNEAsyzkkgwa3lY9U029Ko,945
43
+ mixpeek/types/embedding_response.py,sha256=gQCNVHNVqYii4WLZisEbjkOllSaTwz3PxOhCBOe808Y,955
44
+ mixpeek/types/error_message.py,sha256=8Wh_GdH3jOviv_FYLyzQH20qbFTSzKqqjdZlOe2tlbE,905
45
+ mixpeek/types/error_response.py,sha256=SNectmi0OaoeWGAUvO7D0h40rf7jIEh3SLUtKxXs3ms,995
46
+ mixpeek/types/field_type.py,sha256=ihpE7AL8NwS8mZ9ItVeK26KBmrIa0tLbCag96Pk4dqE,160
47
+ mixpeek/types/generation_response.py,sha256=A07sNXlAY1sY3Cl7zajf4zZaZbdTPFpElg1oDf636P0,1117
48
+ mixpeek/types/html_params.py,sha256=5wylzm01kSNgIgMFMGmgj93LCJpubrX0gp2NuKxjVYE,949
49
+ mixpeek/types/http_validation_error.py,sha256=C6i5Fm74cECbzWUDvUDgAO9g9ryIFeKesoeqTUNakJc,1010
50
+ mixpeek/types/image_params.py,sha256=zdeXR_-EGw_7MKOF1D2zilRFiYJWohDnLVTo1VwLa7U,1070
51
+ mixpeek/types/message.py,sha256=21yebcf5X18U92khfedI-Gl02MkaBzDw4guLNy49bUk,918
52
+ mixpeek/types/metadata.py,sha256=YA7JZx_s7ChSqBA5Ay-zt8cGszDGmQv8PElYzi5N02E,1147
53
+ mixpeek/types/modality.py,sha256=GcEBlbYKdNs0qdyKnmrbgoDHyC1WYimv5PFKUjuI2jc,170
54
+ mixpeek/types/model.py,sha256=mBXXY-K54nqGVqt7SnzAyZeDdoU7wVMzGrhM8XTAmx4,948
55
+ mixpeek/types/models.py,sha256=RnTOybDVTkVIWrZRY18cULyqjGGTWE2ZJuYT0lYv5lo,173
56
+ mixpeek/types/pdf_params.py,sha256=9RF3S2uuE4oyaoPlRfI52phqWyD8ViOz6tl25HXBlek,1646
57
+ mixpeek/types/ppt_params.py,sha256=FS9BjjiZStDhGtaImv8uz9lhQG6r6a9gBiUJsPzhca0,888
58
+ mixpeek/types/pptx_params.py,sha256=W2hrSVvYjRxDrClFRoZKmM0dSb0YbCOjjT5dBiJMkZw,889
59
+ mixpeek/types/settings.py,sha256=F_KpO1F5_yHyRXQr7SPn7QIjVa05ViiyXShlB_ODKsI,1223
60
+ mixpeek/types/source.py,sha256=Dq0CGXa3tyfe01L-d4si02j6YavQ3PQj9N_KkYuMsCk,998
61
+ mixpeek/types/source_destination_mapping.py,sha256=2CTDTYcPbxUco8m_9ebbZ4xQ2_piylkRQeO5fFvdDkM,1041
62
+ mixpeek/types/txt_params.py,sha256=nongbYA0BWr4kHvNBDdA6yoNkg6TXTsP2AG3tstyLd8,888
63
+ mixpeek/types/user.py,sha256=bZ4ROKzi-5c8pfHQ-nvM445m_d3p9DK-OjTbGhXY1-w,1249
64
+ mixpeek/types/validation_error.py,sha256=dy6Ev1xmAsX_Wcck5AX8XvcVNP5xA-Lwlt7FTceiYqs,1029
65
+ mixpeek/types/validation_error_loc_item.py,sha256=LAtjCHIllWRBFXvAZ5QZpp7CPXjdtN9EB7HrLVo6EP0,128
66
+ mixpeek/types/video_params.py,sha256=SJlONUkncIVzFz37Q8iNNznYd10hdLgrMnRmxT5yz5E,890
67
+ mixpeek/types/workflow_response.py,sha256=t3fhcd780TUiCbFmX-2hRQY9oajjdE6g8AOy-lVS95A,1059
68
+ mixpeek/types/workflow_settings.py,sha256=1YXWRIJUxra85keIOglvJra62rItRyuH8PYcG3pgRvE,1003
69
+ mixpeek/types/xlsx_params.py,sha256=SXGQe3KhevNEdxjqIxxHmmuBrrk4IBetEcFaHq-_zQA,939
70
+ mixpeek/users/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
71
+ mixpeek/users/client.py,sha256=Fv01PY1J6mbuaCJPdKr97eONPcmLqzT6q9kuyNfjlSQ,14911
72
+ mixpeek/version.py,sha256=DfAuS0W7koTv3v8TZFxY1W5LvfaqOvG96P6Kc5fNnU0,75
73
+ mixpeek/workflows/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
74
+ mixpeek/workflows/client.py,sha256=lDfSwYGPSMx9enKzPMKObdL93pFn6ByZH04F83cz9jA,24370
75
+ mixpeek-0.6.2.dist-info/LICENSE,sha256=4Wv5VxfDWkCcIouCfq1NrLwPm24Z83PE8Nbi3KyoEeg,1064
76
+ mixpeek-0.6.2.dist-info/METADATA,sha256=YsLQiIOSjceSER6cNNRlJXFlpYQ78bCLOnPqWhoUWUg,3985
77
+ mixpeek-0.6.2.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
78
+ mixpeek-0.6.2.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: poetry-core 1.6.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
@@ -1,12 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: mixpeek
3
- Version: 0.2
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
12
-
@@ -1,6 +0,0 @@
1
- mixpeek/__init__.py,sha256=kvX2oPwa29M4iz8aHDRONX9JJDoK_AGAPau5_9NdNE0,2446
2
- mixpeek-0.2.dist-info/LICENSE.rst,sha256=HHFCinDHL38osjHNrBgNZqExYuEWJ3hNZxzcr1mWWeo,1072
3
- mixpeek-0.2.dist-info/METADATA,sha256=TS84KKiJVMhaN1ETyg8-OKIgZdyuXVVlVAJd23C9QQA,279
4
- mixpeek-0.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
5
- mixpeek-0.2.dist-info/top_level.txt,sha256=EJ8Jc4IhqyUwnUlBwKbs498Ju4O9a-IDh2kXc_lo6Vg,8
6
- mixpeek-0.2.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- mixpeek