You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ob = objectbox.Builder().model(model).directory("db").build()
50
+
# The ObjectBox Store represents a database; keep it around...
51
+
store = objectbox.Store(model=model)
78
52
79
-
#Open the box of "Person" entity. This can be called many times but you can also pass the variable around
80
-
box =objectbox.Box(ob, Person)
53
+
#Get a box for the "Person" entity; a Box is the main interaction point with objects and the database.
54
+
box =store.box(Person)
81
55
82
56
person = Person()
83
57
person.name ="Joe Green"
@@ -88,65 +62,46 @@ box.put(person) # Update
88
62
box.remove(person) # Delete
89
63
```
90
64
91
-
Additionally, see the [TaskList example app](https://github.com/objectbox/objectbox-python/tree/main/example). After checking out this repository to run the example:
65
+
Getting started
66
+
---------------
67
+
Latest version: 4.0.0a0 (2024-05-15)
68
+
69
+
To install or update the latest version of ObjectBox, run this:
70
+
71
+
```bash
72
+
pip install --upgrade --pre objectbox # "--pre" because you want to get the 4.0.0 alpha version
92
73
```
93
-
// Set up virtual environment, download ObjectBox libraries
94
-
make depend
74
+
Now you are ready to use ObjectBox in your Python project.
95
75
96
-
// Activate virtual environment...
97
-
// ...on Linux
98
-
source .venv/bin/activate
99
-
// ...on Windows
100
-
.venv\Scripts\activate
76
+
Head over to the **[ObjectBox documentation](https://docs.objectbox.io)**
77
+
and learn how to setup your first entity classes.
101
78
102
-
// Run the example
103
-
python3 -m example
79
+
### Examples
104
80
105
-
// Once done, leave the virtual environment
106
-
deactivate
107
-
```
81
+
Do you prefer to dive right into working examples?
82
+
We have you covered in the [example](example/) folder.
83
+
It comes with a task list application and a vector search example using cities.
84
+
Additionally, for AI enthusiasts, we provide an "ollama" example,
85
+
which integrates a local LLM (via [ollama](https://ollama.com))
86
+
with ObjectBox to manage and search embeddings effectively.
108
87
109
-
For more information and code examples, see the tests folder. The docs for other languages may also help you understand the basics.
0 commit comments