Metadata-Version: 2.1
Name: superlinked
Version: 37.5.2
Summary: The Superlinked vector computing library
License: Apache-2.0
Author: Superlinked Release
Author-email: release@superlinked.com
Requires-Python: >=3.10,<3.13
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Provides-Extra: batch
Provides-Extra: interactive
Provides-Extra: mongo
Provides-Extra: pub-sub
Provides-Extra: qdrant
Provides-Extra: redis
Provides-Extra: storage
Provides-Extra: topk
Requires-Dist: Deprecated (>=1.2.18,<2.0.0)
Requires-Dist: accelerate (>=0.26.0) ; extra == "interactive"
Requires-Dist: aiofiles (>=24.1.0,<25.0.0)
Requires-Dist: altair (==5.2.0) ; extra == "interactive"
Requires-Dist: asgi-correlation-id (>=4.3.4,<5.0.0)
Requires-Dist: beartype (>=0.17.2,<0.22.0)
Requires-Dist: cachetools (>=5.4,<6.0)
Requires-Dist: filelock (>=3.16.1,<4.0.0)
Requires-Dist: furl (>=2.1.3,<3.0.0)
Requires-Dist: google-cloud-pubsub (>=2.23.0,<3.0.0) ; extra == "pub-sub"
Requires-Dist: google-cloud-storage (>=2.18.2,<4.0.0) ; extra == "storage"
Requires-Dist: graphviz (>=0.20.1,<0.22.0)
Requires-Dist: httpx (>=0.28.1,<0.29.0)
Requires-Dist: instructor (>=1.11.3,<2.0.0)
Requires-Dist: ipywidgets (>=8.1.2,<9.0.0) ; extra == "interactive"
Requires-Dist: jinja2 (>=3.1.4,<4.0.0)
Requires-Dist: jupyter (>=1.0.0,<2.0.0) ; extra == "interactive"
Requires-Dist: modal (==1.1.3)
Requires-Dist: mongo-types (>=0.15.1,<0.16.0) ; extra == "mongo"
Requires-Dist: nest-asyncio (>=1.6.0,<2.0.0)
Requires-Dist: numpy (>=1.25.2,<=3.0.0)
Requires-Dist: open_clip_torch (>=3.0.0,<4.0.0)
Requires-Dist: opentelemetry-api (>=1.34.1,<2.0.0)
Requires-Dist: opentelemetry-sdk (>=1.34.1,<2.0.0)
Requires-Dist: pandas (>=2.0.3,<3.0.0)
Requires-Dist: pydantic (>=2.6.4,<3.0.0)
Requires-Dist: pydantic-settings (>=2.4.0,<3.0.0)
Requires-Dist: pymongo (>=4.7.3,<5.0.0) ; extra == "mongo"
Requires-Dist: qdrant-client (>=1.12.1,<2.0.0) ; extra == "qdrant"
Requires-Dist: redis (>=6.2.0,<7.0.0) ; extra == "redis"
Requires-Dist: redisvl (>=0.8.0,<0.9.0) ; extra == "redis"
Requires-Dist: requests (>=2.31,<3.0)
Requires-Dist: rich (!=14.0.0)
Requires-Dist: sentence-transformers (>=5.0.0,<6.0.0)
Requires-Dist: setuptools (>=70.1.1,<81.0.0) ; python_version >= "3.12"
Requires-Dist: structlog (!=25.4.0,>=24.4,<26.0)
Requires-Dist: topk-sdk (>=0.3.7,<0.5.0) ; extra == "topk"
Requires-Dist: transformers (>=4.51.0,<5.0.0) ; extra == "interactive"
Requires-Dist: typing_extensions (>=3.10.0.2)
Requires-Dist: umap-learn (>=0.5.5,<0.6.0) ; extra == "interactive"
Description-Content-Type: text/markdown

<!-- HERO block -->
<div align="center">

<!-- Logo (auto dark/light) -->
<picture>
  <source srcset="https://cdn.prod.website-files.com/65dce6831bf9f730421e2915/66ef0317ed8616151ee1d451_superlinked_logo_white.png"
          media="(prefers-color-scheme: dark)">
  <img width="320"
       src="https://cdn.prod.website-files.com/65dce6831bf9f730421e2915/65dce6831bf9f730421e2929_superlinked_logo.svg"
       alt="Superlinked logo">
</picture>

<!-- Primary CTA -->
<p>
  <a href="https://superlinked.com/docs/quickstart/" style="text-decoration:none;display:inline-block">
    <img src="https://img.shields.io/badge/start%20with%20SIE-%E2%86%92-72A1FF?style=for-the-badge&logo=readthedocs&logoColor=white"
         alt="start with SIE" width="200">
  </a>
</p>

<!-- Secondary badges -->
<p style="margin:6px 0;text-decoration:none">
  <a href="https://superlinked.com/docs/" style="text-decoration:none;display:inline-block"><img src="https://img.shields.io/badge/Docs-orange?logo=readthedocs" alt="Docs"></a>
  <a href="https://superlinked.com/docs/quickstart/" style="text-decoration:none;display:inline-block"><img src="https://img.shields.io/badge/Quickstart-SIE-72A1FF" alt="SIE Quickstart"></a>
  <a href="https://superlinked.com/models" style="text-decoration:none;display:inline-block"><img src="https://img.shields.io/badge/Models-85%2B-6C63FF" alt="SIE models"></a>
  <a href="https://pypi.org/project/sie-sdk/" style="text-decoration:none;display:inline-block"><img src="https://img.shields.io/pypi/v/sie-sdk" alt="SIE SDK PyPI"></a>
  <a href="https://github.com/superlinked/sie/stargazers" style="text-decoration:none;display:inline-block"><img src="https://img.shields.io/github/stars/superlinked/sie?style=social" alt="Stars"></a>
  <img src="https://img.shields.io/github/last-commit/superlinked/sie" style="display:inline-block" alt="Last commit">
  <img src="https://img.shields.io/github/license/superlinked/sie" style="display:inline-block" alt="License">
  <img src="https://img.shields.io/badge/legacy%20package-deprecated-red" style="display:inline-block" alt="Legacy package deprecated">
</p>

</div>
<p align="center">
  <em><b>SIE: Superlinked Inference Engine</b> is an open-source inference server for small AI models: embeddings, reranking, and extraction.</em><br>
  <em>It runs on your own infrastructure, from a laptop to a production Kubernetes cluster.</em><br>
  <em>The legacy <code>superlinked</code> Python framework is deprecated for new projects. Use <code>sie-sdk</code> instead.</em>
</p>

# Superlinked Python Framework (Deprecated)

> **Deprecated for new projects**
>
> The `superlinked` Python framework is deprecated for new projects.
>
> Superlinked now focuses on **SIE: Superlinked Inference Engine**, an open-source inference server for small AI models. SIE runs encoders, rerankers, and entity extractors on your own infrastructure, from a laptop to a production Kubernetes cluster.
>
> This package does **not** install SIE. It remains available only for existing projects that already depend on the legacy Superlinked framework.
>
> New projects should use SIE instead:
>
> ```bash
> pip install sie-sdk
> ```
>
> SIE GitHub: https://github.com/superlinked/sie  
> SIE docs: https://superlinked.com/docs  
> Superlinked website: https://superlinked.com

## Use SIE for new projects

SIE is the current Superlinked inference product for semantic search, retrieval, RAG, reranking, and information extraction workloads. It exposes three primitives:

- `encode` converts text or images to vectors for semantic search and RAG.
- `score` reranks query-document pairs for higher-precision retrieval.
- `extract` pulls entities and structured data from unstructured text.

Use SIE when you need to:

- Serve 85+ supported models from one API.
- Generate dense, sparse, multi-vector, and vision embeddings.
- Rerank candidate documents or items with reranking models.
- Extract entities and structured information from text.
- Run inference locally with Docker.
- Deploy inference on production Kubernetes infrastructure.
- Integrate inference into search, RAG, and document-processing systems.

SIE is not a drop-in replacement for the deprecated `superlinked` framework. It is the new Superlinked inference product for new applications and infrastructure.

## Quickstart with SIE

SIE runs as a Docker container. Your application calls it over HTTP. Start the server, install the SDK, then call `encode`, `score`, or `extract`.

SIE's primary target is x86 Linux nodes with NVIDIA GPUs. The CPU image is useful for trying SIE locally.

**1. Run the engine**

```bash
# macOS (Apple Silicon)
docker run --platform linux/amd64 -p 8080:8080 \
  -v sie-hf-cache:/app/.cache/huggingface \
  ghcr.io/superlinked/sie-server:latest-cpu-default

# Linux (CPU)
docker run -p 8080:8080 \
  -v sie-hf-cache:/app/.cache/huggingface \
  ghcr.io/superlinked/sie-server:latest-cpu-default

# Linux (NVIDIA GPU)
docker run --gpus all -p 8080:8080 \
  -v sie-hf-cache:/app/.cache/huggingface \
  ghcr.io/superlinked/sie-server:latest-cuda12-default
```

The server starts on port `8080`. Models are available through the API and load on first request.

Optional readiness check:

```bash
curl http://localhost:8080/readyz
# "ok"
```

**2. Install the SDK**

```bash
pip install sie-sdk           # Python
pnpm add @superlinked/sie-sdk # TypeScript
```

**3. Generate embeddings**

```python
from sie_sdk import SIEClient
from sie_sdk.types import Item

client = SIEClient("http://localhost:8080")

result = client.encode("BAAI/bge-m3", Item(text="Hello world"))
print(result["dense"].shape)  # (1024,)
```

**4. Rerank search results**

```python
query = Item(text="What is machine learning?")
items = [
    Item(text="Machine learning uses algorithms to learn from data."),
    Item(text="The weather is sunny today."),
]

result = client.score("BAAI/bge-reranker-v2-m3", query, items)

for entry in result["scores"]:
    print(f"Rank {entry['rank']}: score={entry['score']:.3f}")
```

**5. Extract entities**

```python
result = client.extract(
    "urchade/gliner_multi-v2.1",
    Item(text="Tim Cook is the CEO of Apple."),
    labels=["person", "organization"],
)

for entity in result["entities"]:
    print(f"{entity['label']}: {entity['text']}")
```

## What changed?

The `superlinked` package originally provided a Python framework for building vector search and recommendation applications with declarative schemas, indexes, query-time weighting, and vector database integrations.

That legacy framework is now deprecated for new projects.

Superlinked now focuses on SIE: Superlinked Inference Engine. SIE is designed for teams that need a unified inference layer for modern search, retrieval, RAG, reranking, and information extraction workloads.

## Should I still use this package?

Use `superlinked` only if you are maintaining an existing application that already depends on the legacy framework.

Do not start new projects with this package. For new development, use SIE.

## Links

- SIE GitHub: https://github.com/superlinked/sie
- SIE docs: https://superlinked.com/docs
- SIE quickstart: https://superlinked.com/docs/quickstart
- SIE HTTP API reference: https://superlinked.com/docs/reference/api
- SIE models: https://superlinked.com/models
- SIE examples: https://superlinked.com/docs/examples
- Python SDK on PyPI: https://pypi.org/project/sie-sdk/
- Superlinked website: https://superlinked.com

