purem 2.0.3__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.
purem-2.0.3/LICENSE ADDED
@@ -0,0 +1,37 @@
1
+ # Business Source License 1.1
2
+
3
+ Parameters
4
+ Licensor: Raman Marozau, sa.marozau@gmail.com
5
+ Licensed Work: React Serverless <react-serverless>
6
+ Change Date: Never
7
+ Change License: Proprietary License
8
+ Additional Use Grant: Free for personal and non-commercial research use only.
9
+
10
+ Terms
11
+ The Licensed Work is provided under the Business Source License 1.1 (the "License").
12
+
13
+ The Licensor grants you a non-exclusive, worldwide, non-transferable, limited right to use, copy, distribute, and modify the Licensed Work subject to the following terms:
14
+
15
+ Commercial Use Restriction
16
+ You may use the Licensed Work freely for non-commercial purposes.
17
+ Commercial use requires a separate commercial license from the Licensor.
18
+
19
+ Availability of Source Code
20
+ The source code is provided under this License but may not be used for commercial purposes unless explicitly permitted.
21
+
22
+ Change Date and Transition to Open Source
23
+ On the Change Date, the Licensed Work will automatically transition to the Change License specified above.
24
+ After the Change Date, the restrictions imposed by this License no longer apply.
25
+
26
+ Additional Use Grant
27
+ The Licensor may grant additional permissions, such as allowing specific non-commercial uses or exceptions.
28
+
29
+ Termination
30
+ Any violation of these terms will result in an immediate termination of your rights under this License.
31
+ Upon termination, you must cease all use of the Licensed Work and delete any copies.
32
+
33
+ Disclaimer of Warranty
34
+ The Licensed Work is provided "AS IS", without any warranties, express or implied.
35
+
36
+ Limitation of Liability
37
+ The Licensor is not liable for any damages arising from the use of the Licensed Work.
@@ -0,0 +1,12 @@
1
+ include VERSION
2
+ include requirements.txt
3
+ include LICENSE
4
+ include README.md
5
+ include README.rst
6
+ recursive-include purem *.py
7
+ exclude tests/*
8
+ exclude sandbox/*
9
+ exclude setup.cfg
10
+ exclude lib/*
11
+ exclude htmlcov/*
12
+ exclude .benchmarks/*
purem-2.0.3/PKG-INFO ADDED
@@ -0,0 +1,202 @@
1
+ Metadata-Version: 2.4
2
+ Name: purem
3
+ Version: 2.0.3
4
+ Summary: High-performance mapping function for mixed-type arrays
5
+ Author-email: Raman Marozau <raman@worktif.com>
6
+ License-Expression: BUSL-1.1
7
+ Project-URL: Homepage, https://github.com/morozow/purem
8
+ Project-URL: Documentation, https://worktif.com/docs/basic-usage
9
+ Keywords: mapping,performance,numpy,arrays
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: Unix
16
+ Classifier: Operating System :: POSIX
17
+ Requires-Python: >=3.11
18
+ Description-Content-Type: text/x-rst
19
+ License-File: LICENSE
20
+ Requires-Dist: numpy~=2.1.3
21
+ Requires-Dist: pytest~=8.3.5
22
+ Requires-Dist: torch~=2.6.0
23
+ Requires-Dist: numba~=0.61.0
24
+ Requires-Dist: certifi~=2025.1.31
25
+ Requires-Dist: pydantic~=2.10.6
26
+ Requires-Dist: dotenv~=0.9.9
27
+ Requires-Dist: python-dotenv~=1.1.0
28
+ Requires-Dist: setuptools~=65.5.1
29
+ Requires-Dist: requests~=2.32.3
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest; extra == "dev"
32
+ Requires-Dist: flake8; extra == "dev"
33
+ Requires-Dist: black; extra == "dev"
34
+ Requires-Dist: coverage; extra == "dev"
35
+ Requires-Dist: pytest-mock; extra == "dev"
36
+ Dynamic: license-file
37
+
38
+ Purem - High-Performance Mapping Operations
39
+ ===========================================
40
+
41
+ .. image:: https://badge.fury.io/py/purem.svg
42
+ :target: https://pypi.org/project/purem/
43
+ :alt: PyPI version
44
+
45
+ .. image:: https://img.shields.io/badge/license-BUSL--1.1-blue.svg
46
+ :target: https://worktif.com/documents/terms-of-service
47
+ :alt: License: BUSL-1.1
48
+
49
+ Overview
50
+ --------
51
+
52
+ **Purem** is an advanced high-performance computational library optimized for vectorized mathematical operations. This project focuses on efficient execution of element-wise transformations, including ``softmax``, ``exp``, and other mathematical functions, leveraging highly optimized assembly code for modern architectures.
53
+
54
+ Key Features
55
+ ------------
56
+
57
+ Purem is a blazing-fast AI math engine that turns your Python formulas into native-speed vectorized execution.
58
+ Achieve up to 80Γ— faster performance on CPU/GPU/TPU β€” no rewrites, no dependencies, just speed.
59
+ Designed for ML researchers, scientific computing, and production-grade workloads that can’t afford to wait.
60
+
61
+ ---
62
+
63
+ πŸ”§ Installation
64
+ ---------------
65
+
66
+ Install the Python wrapper via pip::
67
+
68
+ pip install purem
69
+
70
+ πŸ“¦ **Note:** Installation is quick, but ``purem`` must be initialized with a license before use.
71
+ Setup takes less than a minute – we’re ready when you are: https://worktif.com/#start
72
+
73
+ ---
74
+
75
+ πŸš€ Quickstart
76
+ -------------
77
+
78
+ 1. Import and Initialize::
79
+
80
+ from purem import purem
81
+
82
+ purem.configure(license_key='your-license-key') # Auto-downloads and configures backend
83
+
84
+ Alternatively, if you already have the backend ``.so`` file::
85
+
86
+ from purem import purem
87
+
88
+ purem.softmax([...]) # Initialized from local ./lib/libpurem.so
89
+
90
+ ---
91
+
92
+ πŸ“ Local Library Structure
93
+ ---------------------------
94
+
95
+ If the backend ``.so`` is already downloaded manually, place it here::
96
+
97
+ your_project/
98
+ β”œβ”€β”€ main.py
99
+ β”œβ”€β”€ lib/
100
+ β”‚ └── libpurem.so
101
+
102
+ ---
103
+
104
+ πŸ” License-Based Activation
105
+ ----------------------------
106
+
107
+ To automatically download and configure the backend library:
108
+
109
+ 1. Call ``purem.configure(license_key='<your-license-key>')``
110
+ 2. The system will download the ``.so`` file to ``./lib/``
111
+ 3. All functions will become available instantly after initialization
112
+
113
+ Without a valid license key:
114
+
115
+ - No ``.so`` will be downloaded
116
+ - The library won't work unless you provide the ``.so`` manually
117
+
118
+ ---
119
+
120
+ 🧠 Available Functions
121
+ -----------------------
122
+
123
+ After initialization, you can call::
124
+
125
+ from purem import purem
126
+
127
+ purem.softmax([...])
128
+ ...
129
+
130
+ Full function list: https://worktif.com/docs/basic-usage
131
+
132
+ ---
133
+
134
+ πŸ“¦ Packaging Notes
135
+ -------------------
136
+
137
+ This package does **not** bundle the ``.so`` file. You are required to:
138
+
139
+ - Use a license key to download it dynamically
140
+ - Alternatively, place it manually into ``./lib/`` folder before calling ``init()``
141
+
142
+ ---
143
+
144
+ πŸ§ͺ Benchmark Tutorial
145
+ ----------------------
146
+
147
+ Visit the Benchmark Tutorial: https://worktif.com/#benchmarks
148
+
149
+ - How ``Purem`` compares to NumPy, PyTorch and Numba
150
+ - How it reaches low-level performance via native execution
151
+ - Why it's faster than traditional Python-based computation
152
+
153
+ ---
154
+
155
+ πŸ“§ Distribution and Licensing
156
+ ------------------------------
157
+
158
+ We **do not provide direct download links** for the backend.
159
+ All users must either:
160
+
161
+ - Use their license key to install
162
+ - Or receive ``.so`` file from verified sources
163
+
164
+ For access, contact us or visit: https://worktif.com/documents/terms-of-service
165
+
166
+ ---
167
+
168
+ πŸ“š Full Example
169
+ ----------------
170
+
171
+ .. code-block:: python
172
+
173
+ import numpy as np
174
+ from purem import purem
175
+
176
+ # Automatic setup using license key
177
+ try:
178
+ purem.configure(license_key='<your-license-key>')
179
+ except Exception as e:
180
+ print(f"Setup failed: {e}")
181
+
182
+ data = np.array([1.0, 2.0, 3.0], dtype=float)
183
+ output = purem.softmax(data)
184
+
185
+ print(output)
186
+
187
+ ---
188
+
189
+ 🧠 Why Purem?
190
+ --------------
191
+
192
+ - πŸ”₯ High level performance with zero Python overhead
193
+ - πŸ§ͺ Built-in benchmarking and scientific accuracy
194
+ - 🧩 Easy plug-and-play design
195
+ - πŸ” Secure and license-aware system
196
+
197
+ ---
198
+
199
+ πŸ›  Advanced Usage & API Docs
200
+ ----------------------------
201
+
202
+ Coming soon...
purem-2.0.3/README.md ADDED
@@ -0,0 +1,149 @@
1
+ # Purem - High-Performance Mapping Operations
2
+ [![PyPI version](https://badge.fury.io/py/purem.svg)](https://pypi.org/project/purem/)
3
+ [![License: BUSL-1.1](https://img.shields.io/badge/license-BUSL--1.1-blue.svg)](https://worktif.com/documents/terms-of-service)
4
+
5
+ ## Overview
6
+
7
+ **Purem** is an advanced high-performance computational library optimized for vectorized mathematical operations. This project focuses on efficient execution of element-wise transformations, including `softmax`, `exp`, and other mathematical functions, leveraging highly optimized assembly code for modern architectures.
8
+
9
+ ## Key Features
10
+ Purem is a blazing-fast AI math engine that turns your Python formulas into native-speed vectorized execution.
11
+ Achieve up to 80Γ— faster performance on CPU/GPU/TPU β€” no rewrites, no dependencies, just speed.
12
+ Designed for ML researchers, scientific computing, and production-grade workloads that can’t afford to wait.
13
+ ---
14
+
15
+ ## πŸ”§ Installation
16
+
17
+ Install the Python wrapper via pip:
18
+
19
+ ```bash
20
+ pip install purem
21
+ ```
22
+
23
+ πŸ“¦ **Note:** Installation is quick, but `purem` must be initialized with a license before use.
24
+ [Setup](https://worktif.com/#start) takes less than a minute – we’re ready when you are.
25
+
26
+ ---
27
+
28
+ ## πŸš€ Quickstart
29
+
30
+ ### 1. Import and Initialize
31
+
32
+ ```python
33
+ from purem import purem
34
+
35
+ purem.configure(license_key='your-license-key') # Auto-downloads and configures backend
36
+ ```
37
+
38
+ Alternatively, if you already have the backend `.so` file:
39
+
40
+ ```python
41
+ from purem import purem
42
+
43
+ purem.softmax([...]) # Initialized from local ./lib/libpurem.so
44
+ ```
45
+
46
+ ---
47
+
48
+ ## πŸ“ Local Library Structure
49
+
50
+ If the backend `.so` is already downloaded manually, place it here:
51
+
52
+ ```
53
+ your_project/
54
+ β”œβ”€β”€ main.py
55
+ β”œβ”€β”€ lib/
56
+ β”‚ └── libpurem.so
57
+ ```
58
+
59
+ ---
60
+
61
+ ## πŸ” License-Based Activation
62
+
63
+ To automatically download and configure the backend library:
64
+
65
+ 1. Call `purem.configure(license_key='<your-license-key>')`
66
+ 2. The system will download the `.so` file to `./lib/`
67
+ 3. All functions will become available instantly after initialization
68
+
69
+ Without a valid license key:
70
+ - No `.so` will be downloaded
71
+ - The library won't work unless you provide the `.so` manually
72
+
73
+ ---
74
+
75
+ ## 🧠 Available Functions
76
+
77
+ After initialization, you can call:
78
+
79
+ ```python
80
+ from purem import purem
81
+
82
+ purem.softmax([...])
83
+ ...
84
+ ```
85
+
86
+ > Full function list: See [API Reference](https://worktif.com/docs/basic-usage)
87
+
88
+ ---
89
+
90
+ ## πŸ“¦ Packaging Notes
91
+
92
+ This package does **not** bundle the `.so` file. You are required to:
93
+ - Use a license key to download it dynamically
94
+ - Alternatively, place it manually into `./lib/` folder before calling `init()`
95
+
96
+ ---
97
+
98
+ ## πŸ§ͺ Benchmark Tutorial
99
+
100
+ Visit the [Benchmark Tutorial](https://worktif.com/#benchmarks) to learn:
101
+ - How `Purem` compares to NumPy, PyTorch and Numba
102
+ - How it reaches low-level performance via native execution
103
+ - Why it's faster than traditional Python-based computation
104
+
105
+ ---
106
+
107
+ ## πŸ“§ Distribution and Licensing
108
+
109
+ We **do not provide direct download links** for the backend.
110
+ All users must either:
111
+ - Use their license key to install
112
+ - Or receive `.so` file from verified sources
113
+
114
+ For access, contact us or visit: https://worktif.com/documents/terms-of-service
115
+
116
+ ---
117
+
118
+ ## πŸ“š Full Example
119
+
120
+ ```python
121
+ import numpy as np
122
+ from purem import purem
123
+
124
+ # Automatic setup using license key
125
+ try:
126
+ purem.configure(license_key='<your-license-key>')
127
+ except Exception as e:
128
+ print(f"Setup failed: {e}")
129
+
130
+ data = np.array([1.0, 2.0, 3.0], dtype=float)
131
+ output = purem.softmax(data)
132
+
133
+ print(output)
134
+ ```
135
+
136
+ ---
137
+
138
+ ## 🧠 Why Purem?
139
+
140
+ - πŸ”₯ High level performance with zero Python overhead
141
+ - πŸ§ͺ Built-in benchmarking and scientific accuracy
142
+ - 🧩 Easy plug-and-play design
143
+ - πŸ” Secure and license-aware system
144
+
145
+ ---
146
+
147
+ ## πŸ›  Advanced Usage & API Docs
148
+
149
+ Coming soon...
purem-2.0.3/README.rst ADDED
@@ -0,0 +1,165 @@
1
+ Purem - High-Performance Mapping Operations
2
+ ===========================================
3
+
4
+ .. image:: https://badge.fury.io/py/purem.svg
5
+ :target: https://pypi.org/project/purem/
6
+ :alt: PyPI version
7
+
8
+ .. image:: https://img.shields.io/badge/license-BUSL--1.1-blue.svg
9
+ :target: https://worktif.com/documents/terms-of-service
10
+ :alt: License: BUSL-1.1
11
+
12
+ Overview
13
+ --------
14
+
15
+ **Purem** is an advanced high-performance computational library optimized for vectorized mathematical operations. This project focuses on efficient execution of element-wise transformations, including ``softmax``, ``exp``, and other mathematical functions, leveraging highly optimized assembly code for modern architectures.
16
+
17
+ Key Features
18
+ ------------
19
+
20
+ Purem is a blazing-fast AI math engine that turns your Python formulas into native-speed vectorized execution.
21
+ Achieve up to 80Γ— faster performance on CPU/GPU/TPU β€” no rewrites, no dependencies, just speed.
22
+ Designed for ML researchers, scientific computing, and production-grade workloads that can’t afford to wait.
23
+
24
+ ---
25
+
26
+ πŸ”§ Installation
27
+ ---------------
28
+
29
+ Install the Python wrapper via pip::
30
+
31
+ pip install purem
32
+
33
+ πŸ“¦ **Note:** Installation is quick, but ``purem`` must be initialized with a license before use.
34
+ Setup takes less than a minute – we’re ready when you are: https://worktif.com/#start
35
+
36
+ ---
37
+
38
+ πŸš€ Quickstart
39
+ -------------
40
+
41
+ 1. Import and Initialize::
42
+
43
+ from purem import purem
44
+
45
+ purem.configure(license_key='your-license-key') # Auto-downloads and configures backend
46
+
47
+ Alternatively, if you already have the backend ``.so`` file::
48
+
49
+ from purem import purem
50
+
51
+ purem.softmax([...]) # Initialized from local ./lib/libpurem.so
52
+
53
+ ---
54
+
55
+ πŸ“ Local Library Structure
56
+ ---------------------------
57
+
58
+ If the backend ``.so`` is already downloaded manually, place it here::
59
+
60
+ your_project/
61
+ β”œβ”€β”€ main.py
62
+ β”œβ”€β”€ lib/
63
+ β”‚ └── libpurem.so
64
+
65
+ ---
66
+
67
+ πŸ” License-Based Activation
68
+ ----------------------------
69
+
70
+ To automatically download and configure the backend library:
71
+
72
+ 1. Call ``purem.configure(license_key='<your-license-key>')``
73
+ 2. The system will download the ``.so`` file to ``./lib/``
74
+ 3. All functions will become available instantly after initialization
75
+
76
+ Without a valid license key:
77
+
78
+ - No ``.so`` will be downloaded
79
+ - The library won't work unless you provide the ``.so`` manually
80
+
81
+ ---
82
+
83
+ 🧠 Available Functions
84
+ -----------------------
85
+
86
+ After initialization, you can call::
87
+
88
+ from purem import purem
89
+
90
+ purem.softmax([...])
91
+ ...
92
+
93
+ Full function list: https://worktif.com/docs/basic-usage
94
+
95
+ ---
96
+
97
+ πŸ“¦ Packaging Notes
98
+ -------------------
99
+
100
+ This package does **not** bundle the ``.so`` file. You are required to:
101
+
102
+ - Use a license key to download it dynamically
103
+ - Alternatively, place it manually into ``./lib/`` folder before calling ``init()``
104
+
105
+ ---
106
+
107
+ πŸ§ͺ Benchmark Tutorial
108
+ ----------------------
109
+
110
+ Visit the Benchmark Tutorial: https://worktif.com/#benchmarks
111
+
112
+ - How ``Purem`` compares to NumPy, PyTorch and Numba
113
+ - How it reaches low-level performance via native execution
114
+ - Why it's faster than traditional Python-based computation
115
+
116
+ ---
117
+
118
+ πŸ“§ Distribution and Licensing
119
+ ------------------------------
120
+
121
+ We **do not provide direct download links** for the backend.
122
+ All users must either:
123
+
124
+ - Use their license key to install
125
+ - Or receive ``.so`` file from verified sources
126
+
127
+ For access, contact us or visit: https://worktif.com/documents/terms-of-service
128
+
129
+ ---
130
+
131
+ πŸ“š Full Example
132
+ ----------------
133
+
134
+ .. code-block:: python
135
+
136
+ import numpy as np
137
+ from purem import purem
138
+
139
+ # Automatic setup using license key
140
+ try:
141
+ purem.configure(license_key='<your-license-key>')
142
+ except Exception as e:
143
+ print(f"Setup failed: {e}")
144
+
145
+ data = np.array([1.0, 2.0, 3.0], dtype=float)
146
+ output = purem.softmax(data)
147
+
148
+ print(output)
149
+
150
+ ---
151
+
152
+ 🧠 Why Purem?
153
+ --------------
154
+
155
+ - πŸ”₯ High level performance with zero Python overhead
156
+ - πŸ§ͺ Built-in benchmarking and scientific accuracy
157
+ - 🧩 Easy plug-and-play design
158
+ - πŸ” Secure and license-aware system
159
+
160
+ ---
161
+
162
+ πŸ›  Advanced Usage & API Docs
163
+ ----------------------------
164
+
165
+ Coming soon...
purem-2.0.3/VERSION ADDED
@@ -0,0 +1 @@
1
+ 2.0.3
@@ -0,0 +1,6 @@
1
+ from purem.env_config import load_env_config
2
+
3
+ from purem.core import Purem
4
+
5
+
6
+ purem = Purem(licenced_key=load_env_config().PUREM_LICENSED_KEY)