{"id":13877821,"url":"https://github.com/supabase/vecs","last_synced_at":"2025-05-15T08:07:05.144Z","repository":{"id":167319021,"uuid":"642880013","full_name":"supabase/vecs","owner":"supabase","description":"Postgres/pgvector Python Client","archived":false,"fork":false,"pushed_at":"2025-04-09T12:08:38.000Z","size":6918,"stargazers_count":254,"open_issues_count":11,"forks_count":35,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-05-12T17:32:05.033Z","etag":null,"topics":["ai","embeddings","pgvector","postgres","vectors"],"latest_commit_sha":null,"homepage":"https://supabase.github.io/vecs/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supabase.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":"docs/support_changelog.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["supabase"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2023-05-19T14:52:11.000Z","updated_at":"2025-05-11T23:23:22.000Z","dependencies_parsed_at":"2023-09-23T05:07:50.455Z","dependency_job_id":"922bb340-6222-4ebb-a8c8-2656d31d20a7","html_url":"https://github.com/supabase/vecs","commit_stats":{"total_commits":168,"total_committers":12,"mean_commits":14.0,"dds":"0.18452380952380953","last_synced_commit":"ab08b1f341bf6e6a797f7c3935eae59104e8bb3d"},"previous_names":["supabase/vecs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fvecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fvecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fvecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fvecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supabase","download_url":"https://codeload.github.com/supabase/vecs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301431,"owners_count":22047904,"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":["ai","embeddings","pgvector","postgres","vectors"],"created_at":"2024-08-06T08:01:26.047Z","updated_at":"2025-05-15T08:07:05.083Z","avatar_url":"https://github.com/supabase.png","language":"Python","funding_links":["https://github.com/sponsors/supabase"],"categories":["Python"],"sub_categories":[],"readme":"# vecs\n\n\u003cp\u003e\n    \u003ca href=\"https://www.python.org/downloads/\"\u003e\u003cimg src=\"https://img.shields.io/badge/python-3.7+-blue.svg\" alt=\"Python version\" height=\"18\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/supabase/vecs/actions\"\u003e\n        \u003cimg src=\"https://github.com/supabase/vecs/workflows/tests/badge.svg\" alt=\"test status\" height=\"18\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/supabase/vecs/actions\"\u003e\n        \u003cimg src=\"https://github.com/supabase/vecs/workflows/pre-commit/badge.svg\" alt=\"Pre-commit Status\" height=\"18\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\n    \u003ca href=\"https://badge.fury.io/py/vecs\"\u003e\u003cimg src=\"https://badge.fury.io/py/vecs.svg\" alt=\"PyPI version\" height=\"18\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/supabase/vecs/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/pypi/l/markdown-subtemplate.svg\" alt=\"License\" height=\"18\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/vecs/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/vecs.svg\" alt=\"Download count\" height=\"18\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n**Documentation**: \u003ca href=\"https://supabase.github.io/vecs/\" target=\"_blank\"\u003ehttps://supabase.github.io/vecs/\u003c/a\u003e\n\n**Source Code**: \u003ca href=\"https://github.com/supabase/vecs\" target=\"_blank\"\u003ehttps://github.com/supabase/vecs\u003c/a\u003e\n\n---\n\n`vecs` is a python client for managing and querying vector stores in PostgreSQL with the [pgvector extension](https://github.com/pgvector/pgvector). This guide will help you get started with using vecs.\n\nIf you don't have a Postgres database with the pgvector ready, see [hosting](https://supabase.github.io/vecs/hosting/) for easy options.\n\n## Installation\n\nRequires:\n\n- Python 3.7+\n\nYou can install vecs using pip:\n\n```sh\npip install vecs\n```\n\n## Usage\n\nVisit the [quickstart guide](https://supabase.github.io/vecs/api) for more complete info.\n\n```python\nimport vecs\n\nDB_CONNECTION = \"postgresql://\u003cuser\u003e:\u003cpassword\u003e@\u003chost\u003e:\u003cport\u003e/\u003cdb_name\u003e\"\n\n# create vector store client\nvx = vecs.create_client(DB_CONNECTION)\n\n# create a collection of vectors with 3 dimensions\ndocs = vx.get_or_create_collection(name=\"docs\", dimension=3)\n\n# add records to the *docs* collection\ndocs.upsert(\n    records=[\n        (\n         \"vec0\",           # the vector's identifier\n         [0.1, 0.2, 0.3],  # the vector. list or np.array\n         {\"year\": 1973}    # associated  metadata\n        ),\n        (\n         \"vec1\",\n         [0.7, 0.8, 0.9],\n         {\"year\": 2012}\n        )\n    ]\n)\n\n# index the collection for fast search performance\ndocs.create_index()\n\n# query the collection filtering metadata for \"year\" = 2012\ndocs.query(\n    data=[0.4,0.5,0.6],              # required\n    limit=1,                         # number of records to return\n    filters={\"year\": {\"$eq\": 2012}}, # metadata filters\n)\n\n# Returns: [\"vec1\"]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fvecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupabase%2Fvecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fvecs/lists"}