matrice-common 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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Matrice.ai
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,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: matrice_common
3
+ Version: 0.1.0
4
+ Summary: Common utilities for Matrice.ai services
5
+ Author-email: "Matrice.ai" <dipendra@matrice.ai>
6
+ License-Expression: MIT
7
+ Keywords: matrice,common,utilities,cython
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.7
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: <4,>=3.7
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE.txt
23
+ Dynamic: license-file
24
+
25
+
26
+ # matrice\_common
27
+
28
+ **matrice\_common** is a high-performance, Cython-compiled Python package providing reusable utilities for Matrice.ai services.
29
+ It offers ready-to-use authentication classes, error handling helpers, and general-purpose functions with complete type stubs for IDEs.
30
+
31
+ ## Features
32
+
33
+ * **Cython Compiled** – Optimized performance via C extensions.
34
+ * **Authentication Utilities** – Refresh token and access key-based authentication.
35
+ * **Error Handling** – Rich error logging with Kafka producer support.
36
+ * **Utility Functions** – Helpers for caching, dependency management, and duplicate checks.
37
+ * **Type Hints & Stubs** – `.pyi` stubs for full IDE autocomplete and docstring support.
38
+ * **Modular Design** – Clear separation of auth, utils, and RPC components.
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ pip install matrice_common --upgrade
44
+ ```
45
+
46
+ ## Example Usage
47
+
48
+ ```python
49
+ from matrice_common.token_auth import RefreshToken, AuthToken
50
+ from matrice_common.utils import log_errors
51
+
52
+ # Example: Create auth instance
53
+ refresh = RefreshToken(access_key="YOUR_ACCESS_KEY", secret_key="YOUR_SECRET_KEY")
54
+ auth = AuthToken(access_key="YOUR_ACCESS_KEY", secret_key="YOUR_SECRET_KEY", refresh_token=refresh)
55
+
56
+ # Example: Use decorator for automatic error logging
57
+ @log_errors(default_return="failed")
58
+ def risky_function(x):
59
+ return 10 / x
60
+
61
+ print(risky_function(0))
62
+ ```
@@ -0,0 +1,38 @@
1
+
2
+ # matrice\_common
3
+
4
+ **matrice\_common** is a high-performance, Cython-compiled Python package providing reusable utilities for Matrice.ai services.
5
+ It offers ready-to-use authentication classes, error handling helpers, and general-purpose functions with complete type stubs for IDEs.
6
+
7
+ ## Features
8
+
9
+ * **Cython Compiled** – Optimized performance via C extensions.
10
+ * **Authentication Utilities** – Refresh token and access key-based authentication.
11
+ * **Error Handling** – Rich error logging with Kafka producer support.
12
+ * **Utility Functions** – Helpers for caching, dependency management, and duplicate checks.
13
+ * **Type Hints & Stubs** – `.pyi` stubs for full IDE autocomplete and docstring support.
14
+ * **Modular Design** – Clear separation of auth, utils, and RPC components.
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ pip install matrice_common --upgrade
20
+ ```
21
+
22
+ ## Example Usage
23
+
24
+ ```python
25
+ from matrice_common.token_auth import RefreshToken, AuthToken
26
+ from matrice_common.utils import log_errors
27
+
28
+ # Example: Create auth instance
29
+ refresh = RefreshToken(access_key="YOUR_ACCESS_KEY", secret_key="YOUR_SECRET_KEY")
30
+ auth = AuthToken(access_key="YOUR_ACCESS_KEY", secret_key="YOUR_SECRET_KEY", refresh_token=refresh)
31
+
32
+ # Example: Use decorator for automatic error logging
33
+ @log_errors(default_return="failed")
34
+ def risky_function(x):
35
+ return 10 / x
36
+
37
+ print(risky_function(0))
38
+ ```
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: matrice_common
3
+ Version: 0.1.0
4
+ Summary: Common utilities for Matrice.ai services
5
+ Author-email: "Matrice.ai" <dipendra@matrice.ai>
6
+ License-Expression: MIT
7
+ Keywords: matrice,common,utilities,cython
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.7
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: <4,>=3.7
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE.txt
23
+ Dynamic: license-file
24
+
25
+
26
+ # matrice\_common
27
+
28
+ **matrice\_common** is a high-performance, Cython-compiled Python package providing reusable utilities for Matrice.ai services.
29
+ It offers ready-to-use authentication classes, error handling helpers, and general-purpose functions with complete type stubs for IDEs.
30
+
31
+ ## Features
32
+
33
+ * **Cython Compiled** – Optimized performance via C extensions.
34
+ * **Authentication Utilities** – Refresh token and access key-based authentication.
35
+ * **Error Handling** – Rich error logging with Kafka producer support.
36
+ * **Utility Functions** – Helpers for caching, dependency management, and duplicate checks.
37
+ * **Type Hints & Stubs** – `.pyi` stubs for full IDE autocomplete and docstring support.
38
+ * **Modular Design** – Clear separation of auth, utils, and RPC components.
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ pip install matrice_common --upgrade
44
+ ```
45
+
46
+ ## Example Usage
47
+
48
+ ```python
49
+ from matrice_common.token_auth import RefreshToken, AuthToken
50
+ from matrice_common.utils import log_errors
51
+
52
+ # Example: Create auth instance
53
+ refresh = RefreshToken(access_key="YOUR_ACCESS_KEY", secret_key="YOUR_SECRET_KEY")
54
+ auth = AuthToken(access_key="YOUR_ACCESS_KEY", secret_key="YOUR_SECRET_KEY", refresh_token=refresh)
55
+
56
+ # Example: Use decorator for automatic error logging
57
+ @log_errors(default_return="failed")
58
+ def risky_function(x):
59
+ return 10 / x
60
+
61
+ print(risky_function(0))
62
+ ```
@@ -0,0 +1,19 @@
1
+ LICENSE.txt
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ matrice_common.egg-info/PKG-INFO
6
+ matrice_common.egg-info/SOURCES.txt
7
+ matrice_common.egg-info/dependency_links.txt
8
+ matrice_common.egg-info/not-zip-safe
9
+ matrice_common.egg-info/top_level.txt
10
+ matrice_common_compiled/matrice_common/__init__.pyi
11
+ matrice_common_compiled/matrice_common/py.typed
12
+ matrice_common_compiled/matrice_common/rpc.cpython-312-x86_64-linux-gnu.so
13
+ matrice_common_compiled/matrice_common/rpc.pyi
14
+ matrice_common_compiled/matrice_common/session.cpython-312-x86_64-linux-gnu.so
15
+ matrice_common_compiled/matrice_common/session.pyi
16
+ matrice_common_compiled/matrice_common/token_auth.cpython-312-x86_64-linux-gnu.so
17
+ matrice_common_compiled/matrice_common/token_auth.pyi
18
+ matrice_common_compiled/matrice_common/utils.cpython-312-x86_64-linux-gnu.so
19
+ matrice_common_compiled/matrice_common/utils.pyi
@@ -0,0 +1 @@
1
+ matrice_common