Skip to main content

NNext Python Client

About

The NNext Python Client.

NNext is a

  • ⚡ blazingly fast
  • 🔍 nearest-neighbors vector search engine

Installation | Quick Start | Documentation

Installation

To install the pynnext client, activate a virtual environment, and install via pip:

Supported Python Versions

Python >= 3.7, < 3.11

Mac/Linux

pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install nnext

Windows

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install nnext

Quick Start

In order start interacting with NNext, you need to obtain a client here https://console.nnext.ai/.

Here's a quick example showcasing how you can create an index, insert vectors/documents and search among them via NNext.

Let's begin by installing the Connecting to NNext.

SELECT images.uid,
       images.name,
       images.vector < - > 'VECTOR(0.19, 0.81, 0.75, 0.11)'::vector AS dist
FROM nnext-public-data.images.laion
ORDER BY
    dist
    LIMIT 100
import nnext

nnclient = nnext.NNextClient(api_key="NNEXT_API_KEY")

# Perform a query.
QUERY = """
        SELECT images.uid, images.name,
          images.vector <-> 'VECTOR(0.19, 0.81, 0.75, 0.11)'::vector AS dist
        FROM nnext-public-data.images.laion
        ORDER BY
            dist
        LIMIT 100;
    """
query_job = nnclient.query(QUERY)  # API request
rows = query_job.result()  # Waits for query to finish

for row in rows:
    print(row.name)

Documentation

More documentation is available here here https://nnext.ai/docs.:

Metadata

Release files for nnext 0.0.43

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nnext 0.0.43
File Size Uploaded
nnext-0.0.43.tar.gz 48.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nnext 0.0.43
File Interpreter ABI Platform
nnext-0.0.43-py3-none-any.whl Python 3 none any Details

Total release size: 109.3 kB

Release files / nnext-0.0.43.tar.gz

Download URL nnext-0.0.43.tar.gz
Size 48.8 kB
Tags Source
SHA-256 checksum
How to use checksums
af47e9cdd6cc44a815943623ddf42c075993183797f0fa5c8a18079b7b21dc7b
BLAKE2b-256 checksum
How to use checksums
2292e16e3f06320c17b6933b4bb01c3c700c44c4e26bf1e7a1f77c05baa943af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release files / nnext-0.0.43-py3-none-any.whl

Download URL nnext-0.0.43-py3-none-any.whl
Size 60.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac5475a9bd7f2f6a3fcc0bcc47464ab0855b18693e7b756d2ef5d0a7cd10af94
BLAKE2b-256 checksum
How to use checksums
096f6ef79c49a2bfac8a7f319ca685373e8785d3a501de3432b6609b17086054
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.0.43 This release

2 release files

0.0.39

2 release files

0.0.38

2 release files

0.0.37

2 release files

0.0.36

1 release file

0.0.35

1 release file

0.0.34

1 release file

0.0.33

1 release file

0.0.32

1 release file

0.0.31

1 release file

0.0.30

1 release file

0.0.26

1 release file

0.0.24

1 release file

0.0.23

1 release file

0.0.22

1 release file

0.0.19

1 release file

0.0.16

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page