Metadata-Version: 2.4
Name: purem
Version: 2.1.0
Summary: High-performance mapping function for mixed-type arrays
Author-email: Raman Marozau <raman@worktif.com>
License-Expression: BUSL-1.1
Project-URL: Homepage, https://github.com/morozow/purem
Project-URL: Documentation, https://worktif.com/docs/basic-usage
Keywords: mapping,performance,numpy,arrays
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: MacOS
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Requires-Python: >=3.11
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: numpy~=2.1.3
Requires-Dist: pytest~=8.3.5
Requires-Dist: torch~=2.6.0
Requires-Dist: numba~=0.61.0
Requires-Dist: certifi~=2025.1.31
Requires-Dist: pydantic~=2.10.6
Requires-Dist: dotenv~=0.9.9
Requires-Dist: python-dotenv~=1.1.0
Requires-Dist: setuptools~=65.5.1
Requires-Dist: requests~=2.32.3
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Dynamic: license-file

Purem - High-Performance Mapping Operations
===========================================

.. image:: https://badge.fury.io/py/purem.svg
   :target: https://pypi.org/project/purem/
   :alt: PyPI version

.. image:: https://img.shields.io/badge/license-BUSL--1.1-blue.svg
   :target: https://worktif.com/documents/terms-of-service
   :alt: License: BUSL-1.1

Overview
--------

**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.

Key Features
------------

Purem is a blazing-fast AI math engine that turns your Python formulas into native-speed vectorized execution.
Achieve up to 80× faster performance on CPU/GPU/TPU — no rewrites, no dependencies, just speed.
Designed for ML researchers, scientific computing, and production-grade workloads that can’t afford to wait.

---

🔧 Installation
---------------

Install the Python wrapper via pip::

    pip install purem

📦 **Note:** Installation is quick, but ``purem`` must be initialized with a license before use.
Setup takes less than a minute – we’re ready when you are: https://worktif.com/#start

---

🚀 Quickstart
-------------

1. Import and Initialize::

    from purem import purem

    purem.configure(license_key='your-license-key')  # Auto-downloads and configures backend

Alternatively, if you already have the backend ``.so`` file::

    from purem import purem

    purem.softmax([...])  # Initialized from local ./lib/libpurem.so

---

📁 Local Library Structure
---------------------------

If the backend ``.so`` is already downloaded manually, place it here::

    your_project/
    ├── main.py
    ├── lib/
    │   └── libpurem.so

---

🔐 License-Based Activation
----------------------------

To automatically download and configure the backend library:

1. Call ``purem.configure(license_key='<your-license-key>')``
2. The system will download the ``.so`` file to ``./lib/``
3. All functions will become available instantly after initialization

Without a valid license key:

- No ``.so`` will be downloaded
- The library won't work unless you provide the ``.so`` manually

---

🧠 Available Functions
-----------------------

After initialization, you can call::

    from purem import purem

    purem.softmax([...])
    ...

Full function list: https://worktif.com/docs/basic-usage

---

📦 Packaging Notes
-------------------

This package does **not** bundle the ``.so`` file. You are required to:

- Use a license key to download it dynamically
- Alternatively, place it manually into ``./lib/`` folder before calling ``init()``

---

🧪 Benchmark Tutorial
----------------------

Visit the Benchmark Tutorial: https://worktif.com/#benchmarks

- How ``Purem`` compares to NumPy, PyTorch and Numba
- How it reaches low-level performance via native execution
- Why it's faster than traditional Python-based computation

---

📧 Distribution and Licensing
------------------------------

We **do not provide direct download links** for the backend.
All users must either:

- Use their license key to install
- Or receive ``.so`` file from verified sources

For access, contact us or visit: https://worktif.com/documents/terms-of-service

---

📚 Full Example
----------------

.. code-block:: python

    import numpy as np
    from purem import purem

    # Automatic setup using license key
    try:
        purem.configure(license_key='<your-license-key>')
    except Exception as e:
        print(f"Setup failed: {e}")

    data = np.array([1.0, 2.0, 3.0], dtype=float)
    output = purem.softmax(data)

    print(output)

---

🧠 Why Purem?
--------------

- 🔥 High level performance with zero Python overhead
- 🧪 Built-in benchmarking and scientific accuracy
- 🧩 Easy plug-and-play design
- 🔐 Secure and license-aware system

---

🛠 Advanced Usage & API Docs
----------------------------

Coming soon...
