maticlib 0.1.0__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.
maticlib-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Arvoh Software
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.4
2
+ Name: maticlib
3
+ Version: 0.1.0
4
+ Summary: A Python Automation Library for creating agents
5
+ Author-email: Arvoh Software <arvohsoft@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/arvohsoft/maticlib.git
8
+ Project-URL: Repository, https://github.com/arvohsoft/maticlib.git
9
+ Requires-Python: >=3.8
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: httpx>=0.24.0
13
+ Provides-Extra: dev
14
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
15
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
16
+ Requires-Dist: black>=23.0.0; extra == "dev"
17
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
18
+ Dynamic: license-file
19
+
20
+ MATICLIB
@@ -0,0 +1 @@
1
+ MATICLIB
@@ -0,0 +1,5 @@
1
+ from .client import BaseClientModel
2
+ from .exceptions import ClientError
3
+
4
+ __version__ = "0.1.0"
5
+ __all__ = ["BaseClientModel", "ClientError"]
@@ -0,0 +1,48 @@
1
+ from __future__ import annotations
2
+ import httpx
3
+
4
+ class BaseClientModel:
5
+ def __init__(
6
+ self,
7
+ inference_url="",
8
+ header="",
9
+ model="",
10
+ payload="",
11
+ verbose=True
12
+ ):
13
+ self.url = inference_url
14
+ self.headers = header if header else {}
15
+ self.model = model
16
+ self.payload = payload if payload else {}
17
+ self.verbose = verbose
18
+
19
+ def complete(self, prompt: str|list):
20
+ try:
21
+ payload["model"] = self.model
22
+ if type(prompt) == type("string"):
23
+
24
+ payload = self.payload
25
+ payload["messages"][-1]["content"] = prompt
26
+ response = httpx.post(self.url, headers=self.headers, json=payload)
27
+ if self.verbose:
28
+ print(response)
29
+ return response
30
+ except Exception as e:
31
+ import traceback
32
+ traceback.print_exc()
33
+
34
+ def async_complete(self, prompt: str|list):
35
+ try:
36
+ payload["model"] = self.model
37
+ if type(prompt) == type("string"):
38
+
39
+ payload = self.payload
40
+ payload["messages"][-1]["content"] = prompt
41
+ client = httpx.AsyncClient()
42
+ response = client.post(self.url, headers=self.headers, json=payload)
43
+ if self.verbose:
44
+ print(response)
45
+ return response
46
+ except Exception as e:
47
+ import traceback
48
+ traceback.print_exc()
@@ -0,0 +1,3 @@
1
+ class ClientError(Exception):
2
+ """Base exception for Mistral client errors"""
3
+ pass
File without changes
File without changes
File without changes
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.4
2
+ Name: maticlib
3
+ Version: 0.1.0
4
+ Summary: A Python Automation Library for creating agents
5
+ Author-email: Arvoh Software <arvohsoft@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/arvohsoft/maticlib.git
8
+ Project-URL: Repository, https://github.com/arvohsoft/maticlib.git
9
+ Requires-Python: >=3.8
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: httpx>=0.24.0
13
+ Provides-Extra: dev
14
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
15
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
16
+ Requires-Dist: black>=23.0.0; extra == "dev"
17
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
18
+ Dynamic: license-file
19
+
20
+ MATICLIB
@@ -0,0 +1,14 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ maticlib/__init__.py
5
+ maticlib/client.py
6
+ maticlib/exceptions.py
7
+ maticlib/utils.py
8
+ maticlib.egg-info/PKG-INFO
9
+ maticlib.egg-info/SOURCES.txt
10
+ maticlib.egg-info/dependency_links.txt
11
+ maticlib.egg-info/requires.txt
12
+ maticlib.egg-info/top_level.txt
13
+ maticlib/tests/__init__.py
14
+ maticlib/tests/test_client.py
@@ -0,0 +1,7 @@
1
+ httpx>=0.24.0
2
+
3
+ [dev]
4
+ pytest>=7.0.0
5
+ pytest-asyncio>=0.21.0
6
+ black>=23.0.0
7
+ mypy>=1.0.0
@@ -0,0 +1 @@
1
+ maticlib
@@ -0,0 +1,29 @@
1
+ [build-system]
2
+ requires = ["setuptools >= 77.0.3"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "maticlib"
7
+ version = "0.1.0"
8
+ description = "A Python Automation Library for creating agents"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "Arvoh Software", email = "arvohsoft@gmail.com"}
14
+ ]
15
+ dependencies = [
16
+ "httpx>=0.24.0",
17
+ ]
18
+
19
+ [project.optional-dependencies]
20
+ dev = [
21
+ "pytest>=7.0.0",
22
+ "pytest-asyncio>=0.21.0",
23
+ "black>=23.0.0",
24
+ "mypy>=1.0.0",
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/arvohsoft/maticlib.git"
29
+ Repository = "https://github.com/arvohsoft/maticlib.git"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+