Skip to main content

Client library for the NNext Neural search engine

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nnext-0.0.43.tar.gz (48.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nnext-0.0.43-py3-none-any.whl (60.5 kB view details)

Uploaded Python 3

File details

Details for the file nnext-0.0.43.tar.gz.

File metadata

  • Download URL: nnext-0.0.43.tar.gz
  • Upload date:
  • Size: 48.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for nnext-0.0.43.tar.gz
Algorithm Hash digest
SHA256 af47e9cdd6cc44a815943623ddf42c075993183797f0fa5c8a18079b7b21dc7b
MD5 791a6d1cc06aab367c6310cd4446d509
BLAKE2b-256 2292e16e3f06320c17b6933b4bb01c3c700c44c4e26bf1e7a1f77c05baa943af

See more details on using hashes here.

File details

Details for the file nnext-0.0.43-py3-none-any.whl.

File metadata

  • Download URL: nnext-0.0.43-py3-none-any.whl
  • Upload date:
  • Size: 60.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for nnext-0.0.43-py3-none-any.whl
Algorithm Hash digest
SHA256 ac5475a9bd7f2f6a3fcc0bcc47464ab0855b18693e7b756d2ef5d0a7cd10af94
MD5 99de4e7d309ce7457404436ac640114c
BLAKE2b-256 096f6ef79c49a2bfac8a7f319ca685373e8785d3a501de3432b6609b17086054

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page