Skip to main content

infinity

Project description

python-infinity

update python client

  • Update "version" field of [project] chapter and client_version field of ConnectRequest message.
  • build new python SDK
  • upload to pypi.org
  • install new python SDK

build python SDK

rm -f dist/* && python setup.py sdist bdist_wheel

install python SDK

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")
db.drop_table("my_table", ConflictType.Ignore)
table = db_obj.create_table("my_table", {
            "c1": {
                "type": "int",
                "constraints"(optional): ["primary key", ...],
                "default"(optional): 1/"asdf"/[1,2]/...
            },
            "c2": {
                "type":"vector,1024,float32",
            }
        }, 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

infinity_sdk-0.2.0.dev2-py3-none-any.whl (50.8 kB view details)

Uploaded Python 3

File details

Details for the file infinity_sdk-0.2.0.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for infinity_sdk-0.2.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b8d0d66a5e873a7bd7f8e9da02cfaf2d3b2f93a85f2312f1b93414f8c30a1f9
MD5 c0565e91a64717b3f7542699b7066297
BLAKE2b-256 b957d205daa1873b900e3cffbbface7cdf7e0814750d9f3c2004da93d89ca01c

See more details on using hashes here.

Supported by

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