infinity
Project description
python-infinity
build
rm -f dist/* && python setup.py sdist bdist_wheel
install
pip uninstall -y infinity-sdk && pip install dist/*.whl
This will install infinity-sdk and its dependencies.
upload to pypi.org
twine upload dist/*.whl
Enter your pypi API token according to the prompt.
Note that pypi allow a version of a package be uploaded only once. You need to change the version
inside the pyproject.toml
before build and upload.
using
import infinity
from infinity.common import REMOTE_HOST
from infinity.common import ConflictType
infinity_obj = infinity.connect(REMOTE_HOST)
db = infinity_obj.get_database("default")
db.drop_table("my_table", ConflictType.Ignore)
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)
For developer
pip install -e .
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file infinity_sdk-0.1.0.dev13-py3-none-any.whl
.
File metadata
- Download URL: infinity_sdk-0.1.0.dev13-py3-none-any.whl
- Upload date:
- Size: 47.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe763d0aea54f7b98a9db9dd1c1a6bea2e1e886cf6aacc4994c383776bd582c5 |
|
MD5 | 0a473669d0af06779801759094fb720f |
|
BLAKE2b-256 | 84efc86b71dbdcab8541e2191d7266fff050d1fba3ffa2364c55c1dbab854bf3 |