{"id":13788627,"url":"https://github.com/Aquila-Network/AquilaPy","last_synced_at":"2025-05-12T03:30:36.140Z","repository":{"id":57411235,"uuid":"321354019","full_name":"Aquila-Network/AquilaPy","owner":"Aquila-Network","description":"Python client library to access Aquila Network Neural Search Engine","archived":false,"fork":false,"pushed_at":"2022-01-13T08:10:52.000Z","size":35,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T01:37:34.953Z","etag":null,"topics":["aquila-network","neural-search","personal-search","python-client","vector-search-engine"],"latest_commit_sha":null,"homepage":"https://aquila.network","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aquila-Network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-14T13:20:24.000Z","updated_at":"2022-04-10T20:31:46.000Z","dependencies_parsed_at":"2022-09-09T22:23:09.524Z","dependency_job_id":null,"html_url":"https://github.com/Aquila-Network/AquilaPy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aquila-Network%2FAquilaPy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aquila-Network%2FAquilaPy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aquila-Network%2FAquilaPy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aquila-Network%2FAquilaPy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aquila-Network","download_url":"https://codeload.github.com/Aquila-Network/AquilaPy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253667930,"owners_count":21944941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aquila-network","neural-search","personal-search","python-client","vector-search-engine"],"created_at":"2024-08-03T21:00:51.184Z","updated_at":"2025-05-12T03:30:35.849Z","avatar_url":"https://github.com/Aquila-Network.png","language":"Python","funding_links":[],"categories":["Official Implementations"],"sub_categories":["AquilaDB client libraries"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://aquila.network\"\u003e\n    \u003cimg\n      src=\"https://user-images.githubusercontent.com/19545678/133918727-5a37c6be-676f-427b-8c86-dd50f58d1287.png\"\n      alt=\"Aquila Network Logo\"\n      height=\"64\"\n    /\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  \u003cp\u003e\n    \u003ch3\u003e\n      \u003cb\u003e\n        Aquila Py\n      \u003c/b\u003e\n    \u003c/h3\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n    \u003cb\u003e\n      Python client to access Aquila Network Neural Search Engine\n    \u003c/b\u003e\n  \u003c/p\u003e\n  \u003cbr/\u003e\n\u003c/div\u003e\n\nHere is a bird's eye view of where Aquila Client Libraries fit in the entire ecosystem:\n\u003cdiv align=\"center\"\u003e\n  \u003cimg\n    src=\"https://user-images.githubusercontent.com/19545678/133918436-63c39f8a-aa6c-4d7c-939a-20e35cc8b2c2.png\"\n    alt=\"Aquila client libraries\"\n    height=\"400\"\n  /\u003e\n \u003cbr/\u003e\n\u003c/div\u003e\n\n#### install\n\n`pip install aquilapy`\n\n#### Tutorial\n\n```python\nfrom aquilapy import Wallet, DB, Hub\nimport numpy as np\nimport time\n\n# Create a wallet instance from private key\nwallet = Wallet(\"private_unencrypted.pem\")\n\nhost = \"http://127.0.0.1\"\n\n# Connect to Aquila DB instance\ndb = DB(host, \"5001\", wallet)\n\n# Connect to Aquila Hub instance\nhub = Hub(host, \"5002\", wallet)\n\n# Schema definition to be used\nschema_def = {\n    \"description\": \"this is my database\",\n    \"unique\": \"r8and0mseEd901\",\n    \"encoder\": \"strn:msmarco-distilbert-base-tas-b\",\n    \"codelen\": 768,\n    \"metadata\": {\n        \"name\": \"string\",\n        \"age\": \"number\"\n    }\n}\n\n# Craete a database with the schema definition provided\ndb_name = db.create_database(schema_def)\n\n# Craete a database with the schema definition provided\ndb_name_ = hub.create_database(schema_def)\n\nprint(db_name, db_name_)\n\n# Generate encodings\ntexts = [\"Amazon\", \"Google\"]\ncompression = hub.compress_documents(db_name, texts)\nprint(compression)\n\n# Prepare documents to be inserted\ndocs = [{\n    \"metadata\": {\n        \"name\":\"name1\", \n        \"age\": 20\n    },\n    \"code\": compression[0]\n}, {\n        \"metadata\": {\n        \"name\":\"name2\", \n        \"age\": 30\n    },\n    \"code\": compression[1]\n}]\n\n# Insert documents\ndids = db.insert_documents(db_name, docs)\n\nprint(dids)\n\n# Delete some documents\ndids = db.delete_documents(db_name, dids)\n\nprint(dids)\n\n# Perform a similarity search operation\nmatrix = np.random.rand(1, 25).tolist()\n\ntime.sleep(5)\n\ndocs, dists = db.search_k_documents(db_name, matrix, 10)\n\nprint(len(docs[0]), len(dists[0]))\n```\n\ncreated with ❤️ a-mma.indic (a_മ്മ)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAquila-Network%2FAquilaPy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAquila-Network%2FAquilaPy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAquila-Network%2FAquilaPy/lists"}