mixpeek 0.6.20__tar.gz → 0.6.21__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.21
4
4
  Summary: Mixpeek Python SDK
5
5
  Home-page: https://github.com/mixpeek/mixpeek-python
6
6
  Author: Ethan Steininger
@@ -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)
@@ -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.21
4
4
  Summary: Mixpeek Python SDK
5
5
  Home-page: https://github.com/mixpeek/mixpeek-python
6
6
  Author: Ethan Steininger
@@ -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.21',
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
File without changes