infinity
Project description
python-infinity
dependency
pip install -r requirements.txt
build
python setup.py sdist bdist_wheel
install
pip install dist/*.whl
upload
twine upload dist/*
using
import infinity
from infinity.common import REMOTE_HOST
infinity_obj = infinity.connect(REMOTE_HOST)
db = infinity_obj.get_database("default")
db.drop_table("my_table", if_exists=True)
table = db.create_table(
"my_table", {"num": "integer", "body": "varchar", "vec": "vector,5,float"}, None)
table.insert(
[{"num": 1, "body": "undesirable, unnecessary, and harmful", "vec": [1.0] * 5}])
table.insert(
[{"num": 2, "body": "publisher=US National Office for Harmful Algal Blooms", "vec": [4.0] * 5}])
table.insert(
[{"num": 3, "body": "in the case of plants, growth and chemical", "vec": [7.0] * 5}])
res = table.output(["*"]).knn("vec", [3.0] * 5, "float", "ip", 2).to_pl()
print(res)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
infinity_sdk-0.1.0.dev3.tar.gz
(36.2 kB
view details)
Built Distribution
File details
Details for the file infinity_sdk-0.1.0.dev3.tar.gz
.
File metadata
- Download URL: infinity_sdk-0.1.0.dev3.tar.gz
- Upload date:
- Size: 36.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3798bb5b134323abba19b5b04f49fa874f71b333947b86b1b6125feb8d53f26c |
|
MD5 | ecd48de45b0f716512b0d8acd331638a |
|
BLAKE2b-256 | 09b0c2fd004a4545ab968914f23eeb71482ced961adf71867616280852038b5e |
File details
Details for the file infinity_sdk-0.1.0.dev3-py3-none-any.whl
.
File metadata
- Download URL: infinity_sdk-0.1.0.dev3-py3-none-any.whl
- Upload date:
- Size: 38.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 459d5c5325dfe4964324a00c8cc1ea4299575aa57505317ee7c60a514ddb03b3 |
|
MD5 | d83258b7620c6dd7f886eafd130077f1 |
|
BLAKE2b-256 | f21c6b2ba8ff15d36e9912fce90f9210e220d65d152be77b42f343d1516fcf75 |