Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ FROM python:3.12-slim

WORKDIR /app

# Create a non-root user and ensure data directory exists
RUN useradd -m -u 1000 edb && mkdir -p /data && chown edb:edb /data

COPY pyproject.toml .
COPY src/ src/

Expand All @@ -13,6 +16,7 @@ ENV EDB_DB_PATH=/data/edb.db
ENV EDB_API_HOST=0.0.0.0
ENV EDB_API_PORT=8000

USER edb
VOLUME /data

CMD ["edb", "serve"]
30 changes: 18 additions & 12 deletions examples/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,24 @@ def main():

# --- 2. Document Store (NoSQL) ---
print("\n--- Document Store ---")
db.docs.insert("projects", {
"name": "eDB",
"status": "active",
"team": ["Alice", "Charlie"],
"budget": 500000,
})
db.docs.insert("projects", {
"name": "Marketing Campaign",
"status": "planning",
"team": ["Bob"],
"budget": 100000,
})
db.docs.insert(
"projects",
{
"name": "eDB",
"status": "active",
"team": ["Alice", "Charlie"],
"budget": 500000,
},
)
db.docs.insert(
"projects",
{
"name": "Marketing Campaign",
"status": "planning",
"team": ["Bob"],
"budget": 100000,
},
)

active = db.docs.find("projects", filter_dict={"status": "active"})
print(f"Active projects: {[d.data['name'] for d in active]}")
Expand Down
Loading
Loading