mixpeek 0.6.20__tar.gz → 0.6.22__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mixpeek
3
- Version: 0.6.20
3
+ Version: 0.6.22
4
4
  Summary: Mixpeek Python SDK
5
5
  Home-page: https://github.com/mixpeek/mixpeek-python
6
6
  Author: Ethan Steininger
@@ -23,24 +23,38 @@ A Python SDK for the Mixpeek API.
23
23
  pip install mixpeek
24
24
  ```
25
25
 
26
+ ## Usage
27
+
26
28
  ```python
27
29
  from mixpeek import Mixpeek
28
30
  from pydantic import BaseModel
29
31
 
30
32
  mixpeek = Mixpeek("YOUR_API_KEY")
31
33
 
32
- # Example usage
34
+ ```
35
+
36
+ ### Extract
37
+
38
+ ```python
33
39
  extraction = mixpeek.extract.text(
34
40
  input="s3://document.pdf",
35
41
  input_type="url"
36
42
  )
43
+ ```
44
+
45
+ ### Embed
37
46
 
47
+ ```python
38
48
  embedding = mixpeek.embed.video(
39
49
  model="mixpeek/vuse-generic-v1",
40
50
  input="s3://waving_boy.mp4",
41
51
  input_type="url"
42
52
  )
53
+ ```
43
54
 
55
+ ### Generate
56
+
57
+ ```python
44
58
  class ResponseFormat(BaseModel):
45
59
  city: int
46
60
  weather: float
@@ -49,7 +63,13 @@ generated_content = mixpeek.generate.text(
49
63
  response_format=ResponseFormat,
50
64
  context="Please tell me the weather and make sure to respond in the provided JSON schema"
51
65
  )
66
+ ```
67
+
68
+ ### Connections
69
+
70
+ Create connection
52
71
 
72
+ ```python
53
73
  mixpeek.connections.create(
54
74
  alias="my-mongo-test",
55
75
  engine="mongodb",
@@ -60,7 +80,29 @@ mixpeek.connections.create(
60
80
  "password": "your_password"
61
81
  }
62
82
  )
83
+ ```
84
+
85
+ Insert data
86
+
87
+ ```python
88
+ mixpeek.connections.data.insert(
89
+ connection_id="conn_123",
90
+ payload={}
91
+ )
92
+ ```
93
+
94
+ Insert data
95
+
96
+ ```python
97
+ mixpeek.connections.data.delete(
98
+ connection_id="conn_321"
99
+ filters={}
100
+ )
101
+ ```
102
+
103
+ ### Tools
63
104
 
105
+ ```python
64
106
  response = mixpeek.tools.video.process(
65
107
  url="https://s3/video.mp4",
66
108
  frame_interval=5,
@@ -8,24 +8,38 @@ A Python SDK for the Mixpeek API.
8
8
  pip install mixpeek
9
9
  ```
10
10
 
11
+ ## Usage
12
+
11
13
  ```python
12
14
  from mixpeek import Mixpeek
13
15
  from pydantic import BaseModel
14
16
 
15
17
  mixpeek = Mixpeek("YOUR_API_KEY")
16
18
 
17
- # Example usage
19
+ ```
20
+
21
+ ### Extract
22
+
23
+ ```python
18
24
  extraction = mixpeek.extract.text(
19
25
  input="s3://document.pdf",
20
26
  input_type="url"
21
27
  )
28
+ ```
29
+
30
+ ### Embed
22
31
 
32
+ ```python
23
33
  embedding = mixpeek.embed.video(
24
34
  model="mixpeek/vuse-generic-v1",
25
35
  input="s3://waving_boy.mp4",
26
36
  input_type="url"
27
37
  )
38
+ ```
28
39
 
40
+ ### Generate
41
+
42
+ ```python
29
43
  class ResponseFormat(BaseModel):
30
44
  city: int
31
45
  weather: float
@@ -34,7 +48,13 @@ generated_content = mixpeek.generate.text(
34
48
  response_format=ResponseFormat,
35
49
  context="Please tell me the weather and make sure to respond in the provided JSON schema"
36
50
  )
51
+ ```
52
+
53
+ ### Connections
54
+
55
+ Create connection
37
56
 
57
+ ```python
38
58
  mixpeek.connections.create(
39
59
  alias="my-mongo-test",
40
60
  engine="mongodb",
@@ -45,7 +65,29 @@ mixpeek.connections.create(
45
65
  "password": "your_password"
46
66
  }
47
67
  )
68
+ ```
69
+
70
+ Insert data
71
+
72
+ ```python
73
+ mixpeek.connections.data.insert(
74
+ connection_id="conn_123",
75
+ payload={}
76
+ )
77
+ ```
78
+
79
+ Insert data
80
+
81
+ ```python
82
+ mixpeek.connections.data.delete(
83
+ connection_id="conn_321"
84
+ filters={}
85
+ )
86
+ ```
87
+
88
+ ### Tools
48
89
 
90
+ ```python
49
91
  response = mixpeek.tools.video.process(
50
92
  url="https://s3/video.mp4",
51
93
  frame_interval=5,
@@ -5,6 +5,8 @@ from .endpoints.embed import Embed
5
5
  from .endpoints.generate import Generate
6
6
  from .endpoints.connections import Connections
7
7
  from .endpoints.tools import Tools
8
+ from .endpoints.pipelines import Pipelines
9
+
8
10
 
9
11
  class Mixpeek:
10
12
  def __init__(self, api_key: str):
@@ -19,3 +21,4 @@ class Mixpeek:
19
21
  self.generate = Generate(self.base_url, self.headers)
20
22
  self.connections = Connections(self.base_url, self.headers)
21
23
  self.tools = Tools(self.base_url, self.headers)
24
+ self.pipelines = Pipelines(self.base_url, self.headers)
@@ -4,6 +4,7 @@ class Connections:
4
4
  def __init__(self, base_url, headers):
5
5
  self.base_url = base_url
6
6
  self.headers = headers
7
+ self.data = self.Data(self)
7
8
 
8
9
  def create(self, alias: str, engine: str, details: dict):
9
10
  url = f"{self.base_url}connections/"
@@ -14,3 +15,16 @@ class Connections:
14
15
  }
15
16
  response = requests.post(url, json=data, headers=self.headers)
16
17
  return response.json()
18
+
19
+ class Data:
20
+ def __init__(self, parent):
21
+ self.base_url = parent.base_url
22
+ self.headers = parent.headers
23
+
24
+ def insert(self, connection_id: str, payload: dict):
25
+ pass
26
+
27
+ def delete(self, connection_id: str, filters: dict):
28
+ pass
29
+
30
+
@@ -0,0 +1,26 @@
1
+ import requests
2
+
3
+ class Pipelines:
4
+ def __init__(self, base_url, headers):
5
+ self.base_url = base_url
6
+ self.headers = headers
7
+
8
+ def create(self, alias: str, code: str, destination: dict, source: dict):
9
+ url = f"{self.base_url}pipelines/"
10
+ data = {
11
+ "alias": alias,
12
+ "code": code,
13
+ "destination": destination,
14
+ "source": source
15
+ }
16
+ response = requests.post(url, json=data, headers=self.headers)
17
+ return response.json()
18
+
19
+ def invoke(self, pipeline_id: str, payload: dict, options: dict):
20
+ url = f"{self.base_url}pipelines/invoke/{pipeline_id}"
21
+ data = {
22
+ "payload": payload,
23
+ "options": options
24
+ }
25
+ response = requests.post(url, json=data, headers=self.headers)
26
+ return response.json()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mixpeek
3
- Version: 0.6.20
3
+ Version: 0.6.22
4
4
  Summary: Mixpeek Python SDK
5
5
  Home-page: https://github.com/mixpeek/mixpeek-python
6
6
  Author: Ethan Steininger
@@ -23,24 +23,38 @@ A Python SDK for the Mixpeek API.
23
23
  pip install mixpeek
24
24
  ```
25
25
 
26
+ ## Usage
27
+
26
28
  ```python
27
29
  from mixpeek import Mixpeek
28
30
  from pydantic import BaseModel
29
31
 
30
32
  mixpeek = Mixpeek("YOUR_API_KEY")
31
33
 
32
- # Example usage
34
+ ```
35
+
36
+ ### Extract
37
+
38
+ ```python
33
39
  extraction = mixpeek.extract.text(
34
40
  input="s3://document.pdf",
35
41
  input_type="url"
36
42
  )
43
+ ```
44
+
45
+ ### Embed
37
46
 
47
+ ```python
38
48
  embedding = mixpeek.embed.video(
39
49
  model="mixpeek/vuse-generic-v1",
40
50
  input="s3://waving_boy.mp4",
41
51
  input_type="url"
42
52
  )
53
+ ```
43
54
 
55
+ ### Generate
56
+
57
+ ```python
44
58
  class ResponseFormat(BaseModel):
45
59
  city: int
46
60
  weather: float
@@ -49,7 +63,13 @@ generated_content = mixpeek.generate.text(
49
63
  response_format=ResponseFormat,
50
64
  context="Please tell me the weather and make sure to respond in the provided JSON schema"
51
65
  )
66
+ ```
67
+
68
+ ### Connections
69
+
70
+ Create connection
52
71
 
72
+ ```python
53
73
  mixpeek.connections.create(
54
74
  alias="my-mongo-test",
55
75
  engine="mongodb",
@@ -60,7 +80,29 @@ mixpeek.connections.create(
60
80
  "password": "your_password"
61
81
  }
62
82
  )
83
+ ```
84
+
85
+ Insert data
86
+
87
+ ```python
88
+ mixpeek.connections.data.insert(
89
+ connection_id="conn_123",
90
+ payload={}
91
+ )
92
+ ```
93
+
94
+ Insert data
95
+
96
+ ```python
97
+ mixpeek.connections.data.delete(
98
+ connection_id="conn_321"
99
+ filters={}
100
+ )
101
+ ```
102
+
103
+ ### Tools
63
104
 
105
+ ```python
64
106
  response = mixpeek.tools.video.process(
65
107
  url="https://s3/video.mp4",
66
108
  frame_interval=5,
@@ -15,4 +15,5 @@ mixpeek/endpoints/connections.py
15
15
  mixpeek/endpoints/embed.py
16
16
  mixpeek/endpoints/extract.py
17
17
  mixpeek/endpoints/generate.py
18
+ mixpeek/endpoints/pipelines.py
18
19
  mixpeek/endpoints/tools.py
@@ -6,7 +6,7 @@ with open('requirements.txt') as f:
6
6
 
7
7
  setup(
8
8
  name='mixpeek',
9
- version='0.6.20',
9
+ version='0.6.22',
10
10
  author='Ethan Steininger',
11
11
  author_email='ethan@mixpeek.com',
12
12
  description='Mixpeek Python SDK',
File without changes
File without changes
File without changes
File without changes
File without changes