Skip to content
Merged
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
35 changes: 25 additions & 10 deletions .github/workflows/test-python-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,24 +121,29 @@ jobs:
# Don't cancel other matrix jobs if one fails
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
# Temporarily limit to three platforms (skip macOS x86_64 and all Windows)
python-version:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
# - '3.14' # Temporarily disabled to reduce wheel storage usage
# Temporarily limit to four platforms (skip macOS x86_64, Windows ARM64)
# platform: ['linux/amd64', 'linux/arm64', 'darwin/amd64', 'darwin/arm64', 'windows/amd64', 'windows/arm64']
platform: ['linux/amd64', 'linux/arm64', 'darwin/arm64']
platform: ['linux/amd64', 'linux/arm64', 'darwin/arm64', 'windows/amd64']
include:
- platform: linux/amd64
runs-on: ubuntu-24.04
- platform: linux/arm64
runs-on: ubuntu-24.04-arm
- platform: darwin/arm64
runs-on: macos-15
- platform: windows/amd64
runs-on: windows-2025
# - platform: darwin/amd64
# runs-on: macos-15-intel
# - platform: windows/amd64
# runs-on: windows-2025
# - platform: windows/arm64
# runs-on: windows-11-arm
# macOS x86_64 and all Windows temporarily disabled
# macOS x86_64 and Windows ARM64 temporarily disabled

steps:
- name: Checkout code
Expand All @@ -153,6 +158,8 @@ jobs:
shell: bash
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
export PATH="$HOME/.local/bin:$PATH"
uv --version

- name: Download ArcadeDB JARs artifact
Expand All @@ -168,7 +175,7 @@ jobs:
if: matrix.platform != 'linux/amd64' && matrix.platform != 'linux/arm64'
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'temurin'
distribution: 'corretto'
java-version: '25'

- name: Set up Docker Buildx (Linux only)
Expand All @@ -180,7 +187,14 @@ jobs:
run: |
uv pip install --system build wheel setuptools

# Windows currently disabled, no symlink needed
- name: Set UTF-8 encoding (Windows only)
if: matrix.platform == 'windows/amd64' || matrix.platform == 'windows/arm64'
shell: bash
run: |
echo "PYTHONIOENCODING=utf-8" >> $GITHUB_ENV
echo "PYTHONUTF8=1" >> $GITHUB_ENV

# Windows currently enabled, no symlink needed
# - name: Create python3 symlink (Windows only)
# if: matrix.platform == 'windows/amd64' || matrix.platform == 'windows/arm64'
# shell: bash
Expand Down Expand Up @@ -419,8 +433,9 @@ jobs:
echo "**Package**: arcadedb-embedded" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "ℹ️ **Note**: Some platform/Python combinations are excluded from testing:" >> $GITHUB_STEP_SUMMARY
echo "- Windows ARM64 + Python 3.10, 3.14 (no GitHub-hosted runners available)" >> $GITHUB_STEP_SUMMARY
echo "- macOS x86_64 + Python 3.13, 3.14 (no suitable dependencies available)" >> $GITHUB_STEP_SUMMARY
echo "- Python 3.14 is temporarily disabled to reduce wheel storage usage" >> $GITHUB_STEP_SUMMARY
echo "- Windows ARM64 (no GitHub-hosted runners available)" >> $GITHUB_STEP_SUMMARY
echo "- macOS x86_64 (temporarily disabled)" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Some platforms failed testing**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
Expand Down
56 changes: 34 additions & 22 deletions .github/workflows/test-python-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,24 +130,29 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
# Temporarily limit to three platforms (skip macOS x86_64, all Windows)
python-version:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
# - '3.14' # Temporarily disabled to reduce wheel storage usage
# Temporarily limit to four platforms (skip macOS x86_64, Windows ARM64)
# platform: ['linux/amd64', 'linux/arm64', 'darwin/amd64', 'darwin/arm64', 'windows/amd64', 'windows/arm64']
platform: ['linux/amd64', 'linux/arm64', 'darwin/arm64']
platform: ['linux/amd64', 'linux/arm64', 'darwin/arm64', 'windows/amd64']
include:
- platform: linux/amd64
runs-on: ubuntu-24.04
- platform: linux/arm64
runs-on: ubuntu-24.04-arm
- platform: darwin/arm64
runs-on: macos-15
- platform: windows/amd64
runs-on: windows-2025
# - platform: darwin/amd64
# runs-on: macos-15-intel
# - platform: windows/amd64
# runs-on: windows-2025
# - platform: windows/arm64
# runs-on: windows-11-arm
# macOS x86_64 and all Windows temporarily disabled
# macOS x86_64 and Windows ARM64 temporarily disabled

steps:
- name: Checkout code
Expand All @@ -163,7 +168,7 @@ jobs:
if: matrix.platform != 'linux/amd64' && matrix.platform != 'linux/arm64'
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'temurin'
distribution: 'corretto'
java-version: '25'

- name: Set up Docker Buildx (Linux only)
Expand All @@ -179,14 +184,16 @@ jobs:
shell: bash
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
export PATH="$HOME/.local/bin:$PATH"
uv --version

- name: Install Python build dependencies
shell: bash
run: |
uv pip install --system build wheel setuptools

# Windows currently disabled, no symlink needed
# Windows currently enabled, no symlink needed
# - name: Create python3 symlink (Windows only)
# if: matrix.platform == 'windows/amd64' || matrix.platform == 'windows/arm64'
# shell: bash
Expand Down Expand Up @@ -240,24 +247,34 @@ jobs:
python3 download_data.py movielens-small
fi

if echo "$examples" | grep -qE '(^|[[:space:]])07_stackoverflow_multimodel\.py([[:space:]]|$)'; then
if echo "$examples" | grep -qE '(^|[[:space:]])(08_stackoverflow_tables_oltp|09_stackoverflow_tables_olap|10_stackoverflow_graph_oltp|11_stackoverflow_graph_olap|14_stackoverflow_hybrid_queries)\.py([[:space:]]|$)'; then
echo "📥 Downloading Stack Overflow Small dataset..."
python3 download_data.py stackoverflow-small
python3 download_data.py stackoverflow-small --no-vectors
fi

- name: Download datasets
shell: bash
run: |
uv pip install --system tqdm py7zr lxml
cd bindings/python/examples
echo "📥 Downloading MovieLens Small dataset..."
python3 download_data.py movielens-small
echo "📥 Downloading Stack Overflow Small dataset..."
python3 download_data.py stackoverflow-small --no-vectors

- name: Install timeout command (macOS only)
if: matrix.platform == 'darwin/amd64' || matrix.platform == 'darwin/arm64'
shell: bash
run: |
# macOS doesn't have timeout command by default, use coreutils
brew install coreutils

# Windows currently disabled, no env override needed
# - name: Set UTF-8 encoding (Windows only)
# if: matrix.platform == 'windows/amd64' || matrix.platform == 'windows/arm64'
# shell: bash
# run: |
# echo "PYTHONIOENCODING=utf-8" >> $GITHUB_ENV
- name: Set UTF-8 encoding (Windows only)
if: matrix.platform == 'windows/amd64' || matrix.platform == 'windows/arm64'
shell: bash
run: |
echo "PYTHONIOENCODING=utf-8" >> $GITHUB_ENV
echo "PYTHONUTF8=1" >> $GITHUB_ENV

- name: Run all examples
id: run_examples
Expand Down Expand Up @@ -317,11 +334,6 @@ jobs:
example_name="$example (vector search, import from JSONL)"
timeout_duration=900 # 15 minutes
;;
"07_stackoverflow_multimodel.py")
example_args="--dataset stackoverflow-small"
example_name="$example (stackoverflow-small dataset)"
timeout_duration=1800 # 30 minutes
;;
*)
example_args=""
example_name="$example"
Expand Down Expand Up @@ -476,7 +488,7 @@ jobs:
echo "" >> $GITHUB_STEP_SUMMARY
echo "All examples ran successfully across all enabled platforms." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Platforms tested**: linux/amd64, linux/arm64, darwin/arm64" >> $GITHUB_STEP_SUMMARY
echo "**Platforms tested**: linux/amd64, linux/arm64, darwin/arm64, windows/amd64" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Some platforms failed example testing**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
Expand Down
3 changes: 3 additions & 0 deletions bindings/python/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ README.old.md

# Jupyter Notebooks for internal testing
notebooks/

# local built jars
local-jars/
5 changes: 4 additions & 1 deletion bindings/python/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ FROM arcadedata/arcadedb:${ARCADEDB_TAG} AS java-builder
# nothing to do here; jars will be copied from /home/arcadedb/lib in the python-builder stage

# Stage 2: Build minimal JRE with jlink
FROM eclipse-temurin:25-jdk-jammy AS jre-builder
FROM amazoncorretto:25 AS jre-builder

# Install required tooling (findutils for jar exclusion, binutils for jlink)
RUN yum -y install findutils binutils && yum clean all

ARG TARGET_PLATFORM
ARG USE_LOCAL_JARS
Expand Down
21 changes: 11 additions & 10 deletions bindings/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Native Python bindings for ArcadeDB - the multi-model database that supports Graph, Document, Key/Value, Search Engine, Time Series, and Vector models.

**Status**: ✅ Production Ready | **Tests**: 258 Passing | **Platforms**: 3 Supported
**Status**: ✅ Production Ready | **Tests**: 260 Passing | **Platforms**: 4 Supported

---

Expand All @@ -23,9 +23,10 @@ uv pip install arcadedb-embedded
**Requirements:**

- **Python 3.10–3.14** (packaged/tested on CPython 3.12) - No Java installation required!
- **Supported Platforms**: Prebuilt wheels for **3 platforms**
- **Supported Platforms**: Prebuilt wheels for **4 platforms**
- Linux: x86_64, ARM64
- macOS: Apple Silicon (ARM64)
- Windows: x86_64

### 5-Minute Example

Expand Down Expand Up @@ -58,11 +59,11 @@ with arcadedb.create_database("./mydb") as db:

## ✨ Features

- ☕ **No Java Installation Required**: Bundled JRE (~249MB uncompressed)
- 🌍 **3 Platforms Supported**: Linux (x86_64, ARM64), macOS (ARM64)
- ☕ **No Java Installation Required**: Bundled JRE (~60MB uncompressed)
- 🌍 **4 Platforms Supported**: Linux (x86_64, ARM64), macOS (ARM64), Windows (x86_64)
- 🚀 **Embedded Mode**: Direct database access in Python process (no network)
- 🌐 **Server Mode**: Optional HTTP server with Studio web interface
- 📦 **Self-contained**: All dependencies bundled (~116MB wheel)
- 📦 **Self-contained**: All dependencies bundled (~68MB wheel)
- 🔄 **Multi-model**: Graph, Document, Key/Value, Vector, Time Series
- 🔍 **Multiple query languages**: SQL, OpenCypher, MongoDB
- ⚡ **High performance**: Direct JVM integration via JPype
Expand All @@ -78,10 +79,10 @@ The `arcadedb-embedded` package is platform-specific and self-contained:

**Package Contents (all platforms):**

- **Wheel size (compressed)**: ~116MB
- **Wheel size (compressed)**: ~68MB
- **ArcadeDB JARs (uncompressed)**: ~32MB
- **Bundled JRE (uncompressed)**: ~249MB (platform-specific Java 25 runtime via jlink)
- **Total uncompressed size**: ~281MB
- **Bundled JRE (uncompressed)**: ~60MB (platform-specific Java 25 runtime via jlink)
- **Total uncompressed size**: ~95MB

**Note**: Some JARs are excluded to optimize package size (e.g., gRPC wire protocol). See [`jar_exclusions.txt`](https://github.com/humemai/arcadedb-embedded-python/blob/main/bindings/python/jar_exclusions.txt) for details.

Expand All @@ -91,7 +92,7 @@ Import: `import arcadedb_embedded as arcadedb`

## 🧪 Testing

**Status**: 258 tests + example scripts passing on all 3 platforms
**Status**: 260 tests + example scripts passing on all 4 platforms

```bash
# Run all tests
Expand All @@ -107,7 +108,7 @@ See [testing documentation](https://docs.humem.ai/arcadedb/latest/development/te

## 🔧 Building from Source (Advanced)

Linux uses Docker. macOS uses a native Java 25+ JDK with jlink.
Linux uses Docker. macOS and Windows use a native Java 25+ JDK with jlink.

```bash
cd bindings/python/
Expand Down
13 changes: 11 additions & 2 deletions bindings/python/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# Quick local-jar workflow (no host Java install required):
# 1) Build ArcadeDB JARs in Docker:
# docker run --rm -v "$PWD":/src -w /src maven:3.9-eclipse-temurin-25 \
# docker run --rm -v "$PWD":/src -w /src maven:3.9-amazoncorretto-25 \
# sh -c "git config --global --add safe.directory /src && ./mvnw -DskipTests -pl package -am package"
# 2) Point the build at your JAR directory:
# cd bindings/python && ./build.sh linux/amd64 3.12 package/target/arcadedb-*/lib
Expand Down Expand Up @@ -44,6 +44,15 @@ print_usage() {
echo " linux/amd64 Linux x86_64 (Docker build)"
echo " linux/arm64 Linux ARM64 (Docker build, native ARM64 runner)"
echo " darwin/arm64 macOS ARM64 Apple Silicon (native build on macOS)"
echo " windows/amd64 Windows x86_64 (native build on Windows)"
echo ""
echo "PYTHON_VERSION:"
echo " Python version for wheel (default: 3.12)"
echo " Examples: 3.10, 3.11, 3.12, 3.13, 3.14"
echo ""
echo "JAR_LIB_DIR (optional):"
echo " Directory containing ArcadeDB JARs to embed"
echo " If omitted, JARs are pulled from arcadedata/arcadedb:<version>"
echo ""
echo "PYTHON_VERSION:"
echo " Python version for wheel (default: 3.12)"
Expand All @@ -67,7 +76,7 @@ print_usage() {
echo "Package features:"
echo " ✅ Bundled platform-specific JRE (no Java required)"
echo " ✅ Optimized JAR selection (see jar_exclusions.txt)"
echo " ✅ Multi-platform support (3 platforms)"
echo " ✅ Multi-platform support (4 platforms)"
echo " 📦 Size: ~215MB (compressed), ~289MB (installed)"
echo ""
}
Expand Down
Loading
Loading