mixpeek 0.2__tar.gz → 0.5.1__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.2
3
+ Version: 0.5.1
4
4
  Summary: full-text file search API
5
5
  Home-page: https://github.com/mixpeek/mixpeek-python
6
6
  Author: Ethan Steininger
@@ -5,19 +5,32 @@ import json
5
5
 
6
6
  class Mixpeek:
7
7
  def __init__(self, api_key):
8
- self.base_url = "http://localhost:8000"
8
+ self.base_url = "https://api.mixpeek.com"
9
9
  self.headers = {
10
10
  "Authorization": f"Bearer {api_key}",
11
11
  "Content-Type": "application/json",
12
12
  }
13
+
13
14
  self.generate = self.Generate(self)
14
15
  self.parse = self.Parse(self)
16
+ self.embed = self.Embed(self)
15
17
 
16
18
  def _send_post(self, url, payload):
17
19
  return requests.post(url, headers=self.headers, data=json.dumps(payload)).json()
18
20
 
19
- def _send_get(self, url):
20
- return requests.get(url, headers=self.headers).json()
21
+ def _send_get(self, url, payload=None):
22
+ return requests.get(url, headers=self.headers, data=json.dumps(payload)).json()
23
+
24
+ class Embed:
25
+ def __init__(self, mixpeek):
26
+ self.mixpeek = mixpeek
27
+ self.embed_url = f"{self.mixpeek.base_url}/embed"
28
+
29
+ def text(self, text, additional_data=None):
30
+ payload = {"input": text}
31
+ if additional_data is not None:
32
+ payload.update(additional_data)
33
+ return self.mixpeek._send_get(self.embed_url, payload)
21
34
 
22
35
  class Generate:
23
36
  def __init__(self, mixpeek):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mixpeek
3
- Version: 0.2
3
+ Version: 0.5.1
4
4
  Summary: full-text file search API
5
5
  Home-page: https://github.com/mixpeek/mixpeek-python
6
6
  Author: Ethan Steininger
@@ -1,5 +1,5 @@
1
1
  [tool.poetry]
2
- name = "mixpeek-python"
2
+ name = "mixpeek"
3
3
  version = "0.1.0"
4
4
  description = ""
5
5
  authors = ["Ethan Steininger <esteininger21@gmail.com>"]
@@ -9,11 +9,12 @@ readme = "README.md"
9
9
  python = "^3.11"
10
10
  pydantic = "^2.6.4"
11
11
  requests = "^2.31.0"
12
+
13
+ [tool.poetry.dev-dependencies]
12
14
  setuptools = "^69.2.0"
13
15
  wheel = "^0.43.0"
14
16
  twine = "^5.0.0"
15
17
 
16
-
17
18
  [build-system]
18
- requires = ["poetry-core"]
19
+ requires = ["poetry-core>=1.0.0"]
19
20
  build-backend = "poetry.core.masonry.api"
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
3
3
 
4
4
  setup(
5
5
  name="mixpeek",
6
- version="0.2",
6
+ version="0.5.1",
7
7
  license="MIT",
8
8
  author="Ethan Steininger",
9
9
  author_email="info@mixpeek.com",
File without changes
File without changes
File without changes
File without changes