Skip to content

Commit

Permalink
Merge branch '56-update-to-release-version' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
greenrobot committed May 28, 2024
2 parents b2e39fa + cc8924b commit ca79c96
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 24 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
ObjectBox Python ChangeLog
==========================

4.0.0 (2024-05-16)
4.0.0 (2024-05-28)
------------------

* ObjectBox now supports vector search ("vector database") to enable efficient similarity searches.
This is particularly useful for AI/ML/RAG applications, e.g. image, audio, or text similarity.
Other use cases include sematic search or recommendation engines.
See https://docs.objectbox.io/ann-vector-search for details.
* Queries: support for Property-based conditions and logic combinations
* Convenient "Store" API deprecates ObjectBox and Builder API
* The definition of entities (aka the data model) is now greatly simplified
* Type-specific property classes, e.g. `name: String`, `count: Int64`, `score: Float32`
* Automatic ID/UID and model management (i.e. add/remove/rename of entities and properties)
* Automatic discovery of @Entity classes
* Queries: property-based conditions, e.g. `box.query(City.name.starts_with("Be"))`
* Queries: logical operators, e.g. `box.query(City.name == "Berlin" | City.name == "Munich")`
* Convenient "Store" API (deprecates ObjectBox and Builder API)
* New examples added, illustrating an VectorSearch and AI/RAG application
* Stable flat public API provided by single top-level module objectbox
* Dependency flatbuffers: Updated to 24.3.50
* Adjusting the version number to match the core version (4.0); we will be aligning on major versions from now on.

Expand Down
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ ObjectBox Python
Store Python objects and vectors directly with an easy-to-use CRUD API while enjoying exceptional speed and efficiency.
And because it's an embedded database, there's no setup required.

Its advanced vector search empowers AI for a variety of applications, including RAG AI, generative AI,
and similarity searches.
Its advanced vector search empowers AI applications including RAG, generative AI, and similarity searches.

Designed for high performance, the ObjectBox database runs locally on-device.
As an offline-first solution, ObjectBox makes sure your app reliably works offline as well as online
Expand Down Expand Up @@ -67,12 +66,12 @@ box.remove(person) # Delete

Getting started
---------------
Latest version: 4.0.0a0 (2024-05-15)
Latest version: 4.0.0 (2024-05-28)

To install or update the latest version of ObjectBox, run this:

```bash
pip install --upgrade --pre objectbox # "--pre" because you want to get the 4.0.0 alpha version
pip install --upgrade objectbox
```
Now you are ready to use ObjectBox in your Python project.

Expand All @@ -82,19 +81,12 @@ and learn how to setup your first entity classes.
### Examples

Do you prefer to dive right into working examples?
We have you covered in the [example](example/) folder.
We have you covered in the [example](https://github.com/objectbox/objectbox-python/tree/main/example) folder.
It comes with a task list application and a vector search example using cities.
Additionally, for AI enthusiasts, we provide an "ollama" example,
which integrates a local LLM (via [ollama](https://ollama.com))
with ObjectBox to manage and search embeddings effectively.

Alpha Notes
-----------
While ObjectBox Python is powered by a rock stable core written in C/C++, we label our Python binding still "alpha."
We do this to manage expectations as some quality of life improvements are yet to come to our Python binding.
This is mostly about "model management," which still requires you to do some manual coding setup, e.g. for model IDs.
The final release will take care of this for you automatically.

Help wanted
-----------
ObjectBox for Python is open to contributions.
Expand Down
6 changes: 2 additions & 4 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

This directory contains a couple of examples that demonstrate capabilities of ObjectBox using the Python API.

As we are currently short before releasing 4.0 version, please install the pre-release version of `objectbox` from PyPI via `pip`; for example, on UN*X-flavour platforms:

```shell
cd example # assuming you are in project root dir
python3 -m venv venv
source venv/bin/activate
pip install --pre objectbox
pip install objectbox
```

The following examples are available from this directory:
Expand Down Expand Up @@ -57,7 +55,7 @@ This example application starts with a pre-defined set of capital cities and the
It allows to search for nearest neighbors of a city (`city_neighbors`) or by coordinates (`neighbors`) as well as adding more locations (`add`).

```
cd example/vector-search-cities
cd vector-search-cities
$ python main.py
Welcome to the ObjectBox vectorsearch-cities example. Type help or ? for a list of commands.
Expand Down
2 changes: 1 addition & 1 deletion example/ollama/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ based on https://ollama.com/blog/embedding-models
4. Install Python Bindings and ObjectBox:

pip install ollama
pip install --pre objectbox~=0.7.0a
pip install objectbox

Or:

Expand Down
3 changes: 2 additions & 1 deletion example/ollama/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ollama
objectbox~=0.7.0a
objectbox

2 changes: 1 addition & 1 deletion objectbox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
]

# Python binding version
version = Version(4, 0, 0, alpha=5)
version = Version(4, 0, 0)


def version_info():
Expand Down
6 changes: 5 additions & 1 deletion objectbox/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,21 @@
class Version:
def __init__(self, major: int, minor: int, patch: int,
alpha: Optional[int] = None,
beta: Optional[int] = None):
beta: Optional[int] = None,
rc: Optional[int] = None):
self.major = major
self.minor = minor
self.patch = patch
self.alpha = alpha
self.beta = beta
self.rc = rc

def __str__(self):
result = ".".join(map(str, [self.major, self.minor, self.patch]))
if self.alpha is not None:
result += f"a{self.alpha}"
if self.beta is not None:
result += f"b{self.beta}"
if self.rc is not None:
result += f"rc{self.rc}"
return result
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
python_requires='>=3.4, <4',
license='Apache 2.0',
classifiers=[
"Development Status :: 3 - Alpha",
"Development Status :: 5 - Production/Stable"

"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
Expand Down

0 comments on commit ca79c96

Please sign in to comment.