Skip to content

Commit c36ccca

Browse files
Silviano DiazSilviano Diaz
authored andcommitted
Initial public release
0 parents  commit c36ccca

116 files changed

Lines changed: 29750 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/build.yml‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build oracle-vecdb Python SDK
2+
3+
permissions:
4+
contents: read
5+
6+
# Build job automatically on tags, e.g., v1.0.0, v2.1.3, etc.
7+
on:
8+
push:
9+
tags:
10+
- "v*.*.*"
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
# Checkout the repository to access code and build artifacts
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
# Set up Python for building the SDK
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.10"
25+
26+
# Install build dependencies
27+
- name: Install build dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install build
31+
32+
# Build vecdb Python SDK
33+
- name: Build vecdb Python SDK
34+
run: python -m build --sdist --wheel --outdir dist/
35+
36+
# Upload build artifacts for use in Publish workflow
37+
- name: Upload build artifacts
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: vecdb-python-sdk-artifacts
41+
path: dist/*

‎.gitignore‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
reports/
48+
49+
venv/
50+
.venv310/
51+
.venv/
52+
.vscode/
53+
.python-version
54+
.pytest_cache
55+
.mypy_cache/
56+
57+
58+
# Translations
59+
*.mo
60+
*.pot
61+
62+
*.log
63+
64+
# Sphinx documentation
65+
docs/build/
66+
67+
# PyBuilder
68+
target/
69+
70+
# Ipython Notebook
71+
.ipynb_checkpoints
72+
73+
# Oracle Parfait analysis cache
74+
__parfait__/

‎AGENTS.md‎

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Agent Guide: vecdb-python-sdk
2+
3+
## Purpose
4+
5+
- This repository owns the Oracle VecDB Python SDK, its public Python API,
6+
examples, package metadata, tests, and changelog.
7+
8+
## Workspace Setup
9+
10+
- Python 3.10+ is the user-facing requirement from `README.md` and
11+
`pyproject.toml`.
12+
- Keep real hosts, tokens, usernames, passwords, and production table names out
13+
of committed examples, tests, issues, and reviews.
14+
- Prefer `Configuration.access_token` when bearer tokens are available; use
15+
username/password only when the target environment requires it.
16+
- Use host placeholders that preserve the documented ORDS VecDB URL shape:
17+
`https://<host>/ords/<schema>/_/db-api/stable/vecdb/`.
18+
19+
## API Surface (OracleVecDB)
20+
21+
- Table management (`create_vector_table`, `describe_vector_table`,
22+
`drop_vector_table`, `list_vector_tables`, `update_vector_table_annotation`).
23+
- Index lifecycle (`create_index`, `describe_index`, `describe_index_job`,
24+
`list_index_jobs`, `get_index_job_log`, `rebuild_index`, `drop_index`).
25+
- Inference (`generate_embedding`, `rerank`).
26+
- Model orchestration (`load_model`, `list_models`, `describe_model`,
27+
`drop_model`).
28+
- Vector operations (`upsert_vectors`, `list_vectors`, `delete_vectors`,
29+
`load_vectors`, `describe_vector_load_job`, `get_vector_load_job_log`,
30+
`list_vector_load_jobs`).
31+
- Search (`query`).
32+
- Summary (`describe_vector_database`).
33+
34+
## Capability Workflows
35+
36+
- Authentication and configuration: construct `Configuration` with a VecDB ORDS
37+
host and either `access_token` or `username`/`password`, then pass it to
38+
`OracleVecDB`.
39+
- Model management: use `list_models` and `describe_model` before binding a
40+
model to table or rerank workflows. Use `load_model` and `drop_model` only
41+
when the task explicitly includes model lifecycle work.
42+
- Vector tables: use `describe_vector_database` and `list_vector_tables` for
43+
discovery, `create_vector_table` for storage, `describe_vector_table` for
44+
schema/index checks, `update_vector_table_annotation` for metadata updates,
45+
and `drop_vector_table` for cleanup when the workflow owns the table.
46+
- Ingestion: use `upsert_vectors` for inline batches, `delete_vectors` for
47+
removing known records, `list_vectors` for inspection, and `load_vectors`
48+
for object-storage bulk ingestion. Monitor bulk jobs with
49+
`list_vector_load_jobs`, `describe_vector_load_job`, and
50+
`get_vector_load_job_log`.
51+
- Embeddings and reranking: use hosted VecDB model flows through
52+
`generate_embedding`, integrated table embedding configuration, `query`, and
53+
`rerank`.
54+
- Search: use `query` with `query_by`, `top_k`, and verified `filters`. Query
55+
examples may search by text, vector, or record ID only when that shape is
56+
verified from README, docs, source, tests, or explicit checked instruction.
57+
- Index lifecycle: use `create_index`, `list_index_jobs`,
58+
`describe_index_job`, `get_index_job_log`, `rebuild_index`,
59+
`describe_index`, and `drop_index` for index build, monitoring, tuning, and
60+
cleanup workflows.
61+
62+
## Query Filters
63+
64+
The public `query` method accepts a filter dictionary and forwards it through
65+
the SDK request model. The REST documentation lists these filter operators:
66+
67+
```python
68+
filters = {
69+
"$and": [
70+
{"ACCOUNT_CATEGORY": {"$eq": "Savings"}},
71+
{"ELIGIBILITY": {"$eq": "Student"}},
72+
{"MONTHLY_FEE": {"$lte": 5}},
73+
]
74+
}
75+
```
76+
77+
Use only filter operators documented in `docs/source/rest_api.rst` or verified
78+
by SDK tests. Do not copy filter syntax from another vector database product.
79+
80+
## Quick Start
81+
82+
- Use the `README.md` Quickstart as the source of truth for runnable
83+
quick-start examples.
84+
- Use the README Quickstart for integrated embedding flows and the README
85+
"Bring your own vectors" section for BYOV examples.
86+
- If a quick-start flow changes, update `README.md` first and keep this section
87+
as a pointer rather than duplicating runnable snippets.
88+
- Verify any adapted quick-start code against the public SDK surface in this
89+
repo before publishing it.
90+
91+
## Workflow Pointers
92+
93+
- For SDK consumer examples, start with `README.md` and `docs/source/`.
94+
- For public method availability, inspect `OracleVecDB` in
95+
`src/oracle_vecdb/client.py` and existing tests.
96+
- For request or response details, prefer typed SDK models and tests over
97+
copied REST payloads.
98+
- For examples that create resources, include cleanup when it is part of the
99+
demonstrated workflow and does not obscure the main point.
100+
101+
## Troubleshooting
102+
103+
- 401 or 403: check credentials, token freshness, endpoint privileges, and
104+
schema access without exposing secret values.
105+
- 404: verify the ORDS URL shape, schema segment, table name, model name, index
106+
name, and job name.
107+
- 409 or job conflicts: inspect existing load or index jobs before retrying.
108+
- Embedding or rerank failures: verify model availability and the public SDK
109+
request shape before suggesting code changes.
110+
- Large payloads: prefer `load_vectors` over massive inline upserts when the
111+
input is already staged in object storage.
112+
- Slow or unexpected search results: inspect table, index, filter, and query
113+
configuration using public SDK methods before recommending service tuning.

‎CHANGELOG.rst‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Changelog
2+
=========
3+
4+
All notable changes to this project will be documented in this file.
5+
6+
The format is based on the `Keep a Changelog <https://keepachangelog.com/en/1.1.0/>`__,
7+
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`__.
8+
9+
1.0.0 - 2026-07-15
10+
------------------
11+
12+
Added
13+
~~~~~
14+
15+
- Initial public release of oracle_vecdb
16+
- Support for vector table management, indexing, search, and inference operations in Oracle AI Database (26ai+). Refer this for detailed documentation -
17+
https://docs.oracle.com/en/cloud/paas/autonomous-vector-database/vcapi/overview.html
18+
19+
20+
1.0.0b2 - 2026-04-30
21+
------------------
22+
23+
Added
24+
~~~~~
25+
26+
- Added support for automatic batching during large dataset upsert.
27+
- Added support for case-insensitive input keys, allowing user data to use any capitalization for ID, DENSE_VECTOR, and METADATA.
28+
- Updated the host URL validation pattern to work in ExaCC environments for pool mappings.
29+
- Added "rest_url" as the preferred parameter and deprecated "host", with support for disabling "host" later via a feature toggle.
30+
31+
Changed
32+
~~~~~~~
33+
34+
- Renamed `agent.md` to `AGENTS.md` and streamlined it around verified public SDK workflows.
35+
36+
Fixed
37+
~~~~~
38+
39+
- Fixed the ``rerank`` API reference to mention results from ``query`` instead of ``query_vectors()``.
40+
41+
1.0.0b1 - 2026-03-24
42+
------------------
43+
44+
Added
45+
~~~~~
46+
47+
- Limited Availability release.
48+
- Support for vector table management, indexing, search, and inference operations in Oracle AI Database (26ai+).
49+
50+
51+
Compatibility
52+
----------
53+
Requires - Oracle AI Database 23.26.3 and later with ORDS 26.2.2 and later
54+
Supported languages: Python 3.10+

‎CONTRIBUTING.md‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing to this repository
2+
3+
We welcome your contributions! There are multiple ways to contribute.
4+
5+
## Opening issues
6+
7+
For bugs or enhancement requests, please file a GitHub issue unless it's
8+
security related. When filing a bug remember that the better written the bug is,
9+
the more likely it is to be fixed. If you think you've found a security
10+
vulnerability, do not raise a GitHub issue and follow the instructions in our
11+
[security policy](./SECURITY.md).
12+
13+
## Contributing code
14+
15+
We welcome your code contributions. Before submitting code via a pull request,
16+
you will need to have signed the [Oracle Contributor Agreement][OCA] (OCA) and
17+
your commits need to include the following line using the name and e-mail
18+
address you used to sign the OCA:
19+
20+
```text
21+
Signed-off-by: Your Name <you@example.org>
22+
```
23+
24+
This can be automatically added to pull requests by committing with `--sign-off`
25+
or `-s`, e.g.
26+
27+
```text
28+
git commit --signoff
29+
```
30+
31+
Only pull requests from committers that can be verified as having signed the OCA
32+
can be accepted.
33+
34+
## Pull request process
35+
36+
1. Ensure there is an issue created to track and discuss the fix or enhancement
37+
you intend to submit.
38+
1. Fork this repository.
39+
1. Create a branch in your fork to implement the changes. We recommend using
40+
the issue number as part of your branch name, e.g. `1234-fixes`.
41+
1. Ensure that any documentation is updated with the changes that are required
42+
by your change.
43+
1. Ensure that any samples are updated if the base image has been changed.
44+
1. Submit the pull request. *Do not leave the pull request blank*. Explain exactly
45+
what your changes are meant to do and provide simple steps on how to validate.
46+
your changes. Ensure that you reference the issue you created as well.
47+
1. We will assign the pull request to 2-3 people for review before it is merged.
48+
49+
## Code of conduct
50+
51+
Follow the [Golden Rule](https://en.wikipedia.org/wiki/Golden_Rule). If you'd
52+
like more specific guidelines, see the [Contributor Covenant Code of Conduct][COC].
53+
54+
[OCA]: https://oca.opensource.oracle.com
55+
[COC]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/

‎LICENSE.txt‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2026 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.

‎MANIFEST.in‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include LICENSE.txt README.md CHANGELOG.rst pyproject.toml
2+
recursive-include examples *.py

0 commit comments

Comments
 (0)